Scripts
Learn about backup scripts, when they run, and how to use them effectively.
Overview
There are three types of backup scripts:
Pre-backup – executed before the backup starts. You can configure the backup to wait until this script finishes, which is mandatory for scenarios like SQL database backups.
Post-snapshot – executed after the backup snapshots have been created.
Post-backup – executed after the backup completes. For example, this script can be used to shut down the backed-up machine.
Advantages
Using backup scripts can help automate the backup of resources that Xopero ONE cannot back up natively. Xopero ONE also provides features such as incremental and differential backups, deduplication, flexible scheduling, and detailed monitoring of backup copies.
Enabling backup scripts
In the Create backup plan view, scroll to the bottom, click Edit next to Advanced settings, and then select Backup scripts.

Select the type of script you want to enable.
You can enable multiple scripts at the same time.

Select the operating system (Windows, Linux, or macOS) and choose a predefined script from the drop-down list.

If you have selected a script, enable the Wait for the script to continue the task checkbox. This ensures that the backup task will wait until the script finishes. You can also configure a waiting interval and choose to fail the task if the script does not complete successfully.

Predefined scripts
Xopero ONE provides a set of predefined scripts that can be used for common backup tasks. These scripts are ready to use and can be selected directly from the drop-down list when configuring your backup plan.
Pre-task scripts
The script is executed before the backup starts.


SQL Server database backup — protects a Microsoft SQL server database (Windows only).
MySQL database backup — protects a MySQL database (Windows, Linux, and macOS).
PostgreSQL database backup — protects a PostgreSQL database (Windows, Linux, and macOS).
Oracle database backup — protects an Oracle database environment (Linux and macOS only).
Enter path* — allows you to run a custom script; simply type the path to your script to execute it using Xopero ONE (Windows, Linux, and macOS).
Post-snapshot scripts
The script is executed after the data snapshot has been completed.

SQL Server database backup — protects a Microsoft SQL server database.
MySQL database backup — protects a MySQL database.
PostgreSQL database backup — protects a PostgreSQL database.
Enter path* — allows you to run a custom script; simply type the path to your script to execute it using Xopero ONE.
Post-task scripts
The script is executed after the backup is completed.

Shutdown — shuts down the device.
Enter path* — allows you to run a custom script; simply type the path to your script to execute it using Xopero ONE.
*WARNING! If your backup plan includes multiple devices, the script must be located at the same path on all devices where you want it to run.
Useful links and items
Microsoft SQL database backupRestoring MySQL databasePostgreSQL database backupOracle database backupLast updated