CreateOptions.setBackupHookExecute

void setBackupHookExecute(string execute) @safe

Sets the backup hook execute command.

The command is executed before and after reading files matching the backup hook mask. This is useful for ensuring application consistency (e.g., flushing databases, stopping services) before their data files are read.

The hook command receives several macros:

  • %f - the full path of the file about to be read
  • %p - the path part of the file
  • %b - the basename part of the file
  • %u - the UID of the file
  • %g - the GID of the file
  • %t - the type of the file ('f' for regular file, 'd' for directory, etc.)
  • %c - the context ("start" before reading, "end" after reading)

Parameters

executethe command to execute for hooked files (empty string disables)