All pages
Powered by GitBook
1 of 1

Loading...

Scripts

Learn about backup scripts, when they run, and how to use them effectively.

Overview

There are three types of backup scripts:

  1. 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.

  2. Post-snapshot – executed after the backup snapshots have been created.

  3. Post-backup – executed after the backup completes. For example, this script can be used to shut down the backed-up machine.


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.


1

In the Create backup plan view, scroll to the bottom, click Edit next to Advanced settings, and then select Backup scripts.

2

Select the type of script you want to enable.

3

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.

  1. SQL Server database backup — protects a Microsoft SQL server database (Windows only).

  2. MySQL database backup — protects a MySQL database (Windows, Linux, and macOS).

  3. PostgreSQL database backup — protects a

  1. SQL Server database backup — protects a Microsoft SQL server database.

  2. MySQL database backup — protects a MySQL database.

  3. PostgreSQL database backup — protects a PostgreSQL database.

  1. Shutdown — shuts down the device.

  2. Enter path* — allows you to run a custom script; simply type the path to your script to execute it using Xopero ONE.


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

4

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.

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).

  • Enter path* — allows you to run a custom script; simply type the path to your script to execute it using Xopero ONE.

    Advantages

    Enabling backup scripts

    You can enable multiple scripts at the same time.

    Predefined scripts

    Custom pre- and post-task scripts can identify the current backup type by using the __XOPERO_BACKUP_TYPE__ argument. When this argument is included in a script, it is dynamically replaced at runtime with a specific string value corresponding to the current backup type, injecting Full for a full backup, Incremental for an incremental backup, Differential for a differential backup, or SyntheticFull for a synthetic full backup.

    Pre-task scripts

    The script is executed before the backup starts.

    Post-snapshot scripts

    The script is executed after the data snapshot has been completed.

    Post-task scripts

    The script is executed after the backup is completed.

    *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 backup
    Restoring MySQL database
    PostgreSQL database backup
    Oracle database backup
    Windows OS.
    Linux and macOS.
    Windows OS.
    predefined script