Pre- and post-backup commands

Stop a service or dump a database before the backup, and restart it afterwards.

How to use it

  1. On the job, open Commands.
  2. Enter the pre-backup command (e.g. net stop "SQL Server" or an export script). Commands run through cmd.exe, in the source folder, with the same rights as DriveCopy.
  3. Do not run the backup if the pre-backup command fails is on by default; any exit code other than 0 counts as a failure.
  4. Enter the post-backup command. It runs after errors and cancellation too, as long as the job really started; it does not run if the job was stopped or deferred before starting.
  5. Set the maximum time per command in minutes. Output and exit code are written to the activity log.
Good to knowAvailable variables: %DRIVECOPY_JOB% (job name), %DRIVECOPY_SOURCE% (source folder) and, in the post-backup command, %DRIVECOPY_RESULT% (success / failure / stopped). Only enter commands you trust; commands in imported settings are listed before you confirm.
← Block backup for large filesSQL Server database backup →