Step 14. Pre / Post Actions

Customize actions before and/or after the backup plan exectuion.

Executing Custom Scripts

You can execute custom scripts before or after running the backup plan.

  • To specify the script execution before the backup plan starts, select the Pre-backup action check box, then specify the path to the script in the field below. To open a standard Windows dialog box, click the ... button
  • Select the pre-backup script execution options:
    • Exit backup plan if pre-backup action failed. Select this option to cancel the backup plan in case the specified script fails
    • Continue backup plan if pre-backup action failed. Select this option to run the backup plan regardless the specified script execution results
  • To specify the script execution after the backup plan terminates, select the Post-backup action check box, then specify the path to the script in the field below. To open a standard Windows dialog box, click the ... button
  • Select the post-backup script execution options:
    • Execute post-backup action only if backup plan has been successfully completed. Select this option to execute the post-backup script only in case of a backup plan success
    • Execute post-backup action regardless of the backup result. Select this option to execute the post-backup script in any case

Note that an absolute path to a script is required, i.e. if you specify the path to a script, it should be as follows:

c:\scripts\prebackup-script.bat

In case the absolute path to a script file is not specified, the default directory for script is "C:\Windows\System32"

The following script formats are supported: EXE, COM, BAT, CMD, or PIF

Mind that MSP360 (CloudBerry) Backup supports EXE files have several restrictions: EXE files must not use GUI and must close automatically upon termination.

For example, the following script will not succeed:

cmd.exe /F:ON

In this case, this command must be used with the /C parameter, as shown below:

cmd.exe /F:ON /C

The same restriction applies to applications executed by PowerShell scripts:

PowerShell.exe Start-Process cmd.exe exit

It is recommended to perform a test run for the created backup plan to ensure that MSP360 (CloudBerry) Backup properly executes specified scripts.

Backup Plan Chains

In case you need to run another backup or restore plan once the backup plan is finished, use the Backup Chain feature. To create a backup chain, select the Backup chain check box, then select a backup or restore plan to be chained.

  • To chain the backup plan with another plan, select Backup chain check box, then select the plan name in the drop-down menu
    • Select Run the selected plan if this backup tplan completes with success option if you want to run the specified plan only if the backup plan has been successfully completed
    • Select Run the selected plan regardless of the backup plan completion result option if you want to run the chained backup plan regardless of the current backup plan execution results.
    • In case you chained a backup plan, you can enable the full backup for it regardless of the contents in the backup storage. To do this, select the Force full backup for the chained plan. By default, full or incremental backups will be started according to the schedule of this backup plan.

To learn more about the full backup type, refer to the Full Backup chapter

Once you are done, click Next.

https://git.cloudberrylab.com/egor.m/doc-help-std.git