Scripts in Backup Manager
You can set up Backup Manager to perform certain actions before or after backups. This is done with the help of scripts. You can use any command line commands as scripts in Backup Manager.
Here is how to add a script to Backup Manager.
- Click Preferences > Scripts.
- Click Add script.
- Configure the settings.
- (optional) Click Test to make sure the script has been entered correctly.
- Click Save.
The Group field on Linux and macOS requires the name of the group.
Available settings for scripts
- Scripts run under the LocalSystem account that Backup Manager normally operates under. If your script requires some special permissions, you should provide an alternative username and password. The account you specify must be from the administrative group. Different username formats are supported:
- If a pre-backup script is important, you can enable the Fail backup on error setting. Unless the script is completed successfully, backup sessions will not be performed.
- In the Timeout field, you can enter a time limit (in seconds) after which the script will be stopped.
The scripts you have added become available for selection in the backup schedule settings (Preferences > Schedule). You can add a script to an existing backup schedule or create a new schedule for this purpose.
Once added to the schedule, these scripts run once per backup source. For example, where a schedule contains both Files & Folders and System State backup sources, a schedule’s pre-backup script runs before each backup takes place.
To remove a script that you no longer need, use the cross icon next to its name.
Note for Linux users
The syntax for Linux machines is the same as for usual bash scripts. Here is an example:
#!/bin/sh echo "Daily backup completed" >> /tmp/daily-backups.txt exit 0