Blog Articles
Read MSP360’s latest news and expert articles about MSP business and technology
MSP360 Standalone Backup

How to Set Up Pre-/Post- Actions Using MSP360 Backup

How to Set Up Pre-/Post- Actions Using MSP360 Backup

Learn how you can configure Pre- and Post- actions that will run before and after the actual backup runs in MSP360 (CloudBerry) Backup. This feature can make it easier to back up SQL Server and Exchange databases. You can set up a Pre-backup action before the backup plan starts, and also you can set up a Post-backup action after the backup will be successfully completed or in case of the backup plan failure. E.g., you can set Post–backup action to clean up the SQL Server backup directory from the previous versions of backed up files after successful completion of the Microsoft SQL Server backup plan.
To set up Pre-backup / Post-backup action on the Pre/Post Actions step of the Edit Backup Plan Wizard specify the absolute path to the action scripts and select the script execution option as described in the documentation.
Pre/post actions

Executing Custom Scripts

You can execute custom scripts before or after running the current backup task by enabling the following options in the Edit Backup Plan Wizard:

  • Pre-backup action
    Specifies the script to be executed before running the current task.

When you enable this option, you can choose whether to skip or continue the current task when this script execution fails.

  • Post-backup action
    Specifies the script to be executed after the current task is completed or fails.

When you enable this option, you can choose whether to execute this script only after the current task is completed successfully, or regardless of the current task execution result.

Your script can be stored in an EXE, COM, BAT, CMD, or PIF file.

Unless you specified an absolute path to the script file, it is searched for in the "C:\Windows\System32" directory.

When you need to launch an EXE file, please make sure that it can be properly executed in the CloudBerry Backup application context. In particular, CloudBerry Backup will only be able to execute EXE files that do not provide the graphical user interface and will be closed upon their execution.

For example, CloudBerry Backup will not be able to execute the following script...

cmd.exe /F:ON

... and you need to execute this command with the "/C" parameter, as follows:

cmd.exe /F:ON /C

The same applies to applications executed by PowerShell scripts:

PowerShell.exe Start-Process cmd.exe exit

We recommend that you perform a test run for the created backup plan to ensure that MSP360 (CloudBerry) Backup can properly execute the specified scripts.

Chaining Your Backups

In addition, you can make the Backup Wizard automatically trigger the execution of another backup or restore plan after finishing the current backup job.

After enabling the "Backup chain" option, you can select a plan to execute and choose among the following two options:

  • Execute the specified plan only if backup has been completed successfully
  • Execute the specified plan regardless of the backup result

As always, we are happy to hear your feedback and you are welcome to post a comment.

Check out the following guide for more information:
Further reading SQL Server Backup and Restore Guide

author avatar
Alexander N
Alexander is the director of marketing at MSP360 and has been an important member of the company since its inception. He is an expert in IT marketing and has extensive knowledge of cloud storage services. Alexander cooperates with cloud vendors, MSPs, VARs and communicates the market needs and trends to our team.
MSP360 Backup
An affordable and secure backup solution that works on all major platforms, including Windows, Linux, Mac, Hyper-V, and VMware.
New call-to-action
Managed Backup icon