scheduled-backup: Managing Scheduled Backup Tasks
The scheduled-backup
utility is used for managing scheduled backup tasks on a Plesk server.
Usage
scheduled-backup <command> [<arguments>] [<options>]
Example
The following command configures creating weekly backups of the Plesk server every Friday:
plesk bin scheduled-backup --configure weekly -backup-weekday friday
Commands
Command | Argument | Description | Example |
---|---|---|---|
--enable |
<hourly|daily|weekly|monthly> |
Enables the specified scheduled backup task. |
To enable the daily scheduled backup task on the Plesk server: plesk bin scheduled-backup --enable daily |
--disable |
<hourly|daily|weekly|monthly> |
Disables the specified scheduled backup task. |
To disable the monthly scheduled backup task on the Plesk server: plesk bin scheduled-backup --disable monthly |
--configure |
<hourly|daily|weekly|monthly> |
Configures the specified scheduled backup task. |
To configure running of the weekly scheduled backup task on the Plesk server at 01:15 a.m.: plesk bin scheduled-backup --configure weekly -backup-time 01:15 |
--run |
<hourly|daily|weekly|monthly> |
Runs the specified scheduled backup task. |
To run the hourly scheduled backup task on the Plesk server: plesk bin scheduled-backup --run hourly |
--list |
Shows the list of scheduled backup tasks. |
To see the list of scheduled backup tasks on the Plesk server: plesk bin scheduled-backup --list -server |
|
--help or --h
|
<hourly|daily|weekly|monthly> |
Displays the help reference for the utility. |
To see the utility help: plesk bin scheduled-backup --help |
Options
Option | Parameter | Description | Example |
---|---|---|---|
-server |
Specifies a server-level scheduled backup task. This is the default option. Used only with the |
To enable the monthly scheduled backup task for the whole Plesk server: plesk bin scheduled-backup --enable monthly -server |
|
-reseller |
<login_name> |
Specifies the reseller whose scheduled backup tasks will be affected by the command. Used only with the |
To run the hourly scheduled backup task of the reseller John Doe: plesk bin scheduled-backup --run hourly -reseller jdoe |
-customer |
<login_name> |
Specifies the customer whose scheduled backup tasks will be affected by the command. Used only with the |
To disable the weekly scheduled backup task of the customer John Doe: plesk bin scheduled-backup --disable weekly -customer jdoe |
-subscription |
<domain_name> |
Specifies the domain’s subscription whose scheduled backup tasks will be affected by the command. Used only with the |
To enable the monthly scheduled backup task of the domain “example.com”: plesk bin scheduled-backup --enable monthly -subscription example.com |
-all |
Specifies all scheduled backup tasks of the Plesk server. Used only with the |
To see the list of all scheduled backup task on the Plesk server: plesk bin scheduled-backup --list -all |
|
-storage |
<server|ftp|google-drive-backup> |
Specifies where backup files will be stored. Used only with the |
To store daily backup files on the Plesk server: plesk bin scheduled-backup --configure daily -storage server |
-keep-in-server-storage |
<true|false> |
Enables/disables storing of backup files both on the Plesk server and the remote storage. Used only with the |
To enable storing daily backup files both on the Plesk server and the remote storage: plesk bin scheduled-backup --configure daily -keep-in-server-storage true |
-backup-hourly-period |
<1|2|3|4|6|8|12> |
Specifies the frequency (in hours) of creating hourly scheduled backups. Used only with the |
To make Plesk create an hourly backup every 3 hours: plesk bin scheduled-backup --configure hourly -backup-hourly-period 3 |
-backup-time |
<hours:minutes> |
Specifies the exact time of the day for creating a scheduled daily, weekly, or monthly backup. Used only with the |
To make the Plesk server create daily backups at 5:30 a.m.: plesk bin scheduled-backup --configure daily -backup-time 05:30 |
-backup-weekday |
<sunday|monday|tuesday|wednesday|thursday|friday|saturday> |
Specifies the day of the week for creating a scheduled weekly backup. Used only with the |
To make the Plesk server create weekly backups on Saturdays: plesk bin scheduled-backup --configure weekly -backup-weekday saturday |
-backup-day |
<day of the month|first|last> |
Specifies the day of the month for creating a scheduled monthly backup. Used only with the |
To make the Plesk server create monthly backups on the last day of the month: plesk bin scheduled-backup --configure monthly -backup-day last |
-incremental |
<true|false> |
Enables/disables creating scheduled incremental backups. Used only with the |
To disable creating scheduled daily incremental backups on the Plesk server: plesk bin scheduled-backup --configure daily -incremental false |
-full-frequency |
<daily|weekly|monthly|yearly> |
Specifies the frequency of creating a scheduled full server backup. Used only with the |
To make the Plesk server create full server backups every month: plesk bin scheduled-backup --configure daily -full-frequency monthly |
-full-retention |
<number_of_periods> |
Specifies the number of periods, during which a full server backup is stored. A period is the time between creating scheduled full server backups. For example, if a full server backup is created every week and the specified option value is 4, then the full server backup will be removed after 4 weeks. Note: To disable automatic removal of full server backups, leave the option value empty. Used only with the |
To store full server backups created on a monthly basis for 3 months: plesk bin scheduled-backup --configure monthly -full-retention 3 |
-exclude-mail |
<true|false> |
Enables/disables backing up of emails during scheduled backup tasks. Used only with the |
To disable backing up of emails on a daily basis: plesk bin scheduled-backup --configure daily -exclude-mail true |
-exclude-user-files |
<true|false> |
Enables/disables backing up of user files during scheduled backup tasks. Used only with the |
To disable backing up of user files on a daily basis: plesk bin scheduled-backup --configure daily -exclude-user-files true |
-exclude-databases |
<true|false> |
Enables/disables backing up of databases during scheduled backup tasks. Used only with the |
To disable backing up of databases on a weekly basis: plesk bin scheduled-backup --configure weekly -exclude-databases true |
-exclude-log-file |
<true|false> |
Enables/disables backing up of log files during scheduled backup tasks. Used only with the |
To disable backing up of log files on a daily basis: plesk bin scheduled-backup --configure daily -exclude-log-file true |
-exclude-files-list |
<httpdocs/file[,httpdocs/prefix*[,...]]> |
Specifies the list of files that must not be backed up during scheduled backup tasks. Used only with the |
To prevent temporary files and draft documents from being backed up during daily scheduled backup tasks: plesk bin scheduled-backup --configure daily -subscription example.com -exclude-files-list tmp,docs/draft* |
-multivolume |
<true|false> |
Enables/disables splitting backups stored on remote storage into multiple volumes. Used only with the |
To enable splitting daily backups on remote storage into multiple volumes: plesk bin scheduled-backup --configure daily -multivolume true |
-volume-size |
<size> |
Specifies the size of each multi-volume backup file in megabytes. Used only with the |
To set the volume size of daily backups to 1024 megabytes: plesk bin scheduled-backup --configure monthly -volume-size 1024 |
-send-email-on-errors |
<true|false> |
Enables/disables sending email notifications about errors during execution of scheduled backup tasks. Used only with the |
To enable sending emails about errors during execution of scheduled daily backup tasks: plesk bin scheduled-backup --configure daily -send-email-on-errors true -email jdoe@mail.com |
-email |
<user@example.com> |
Specifies the email address to which notifications about errors during execution of scheduled backup tasks must be sent. Used only with the |
To send emails about errors that occurred in scheduled daily backup tasks to jdoe@mail.com: plesk bin scheduled-backup --configure daily -send-email-on-errors true -email jdoe@mail.com |
-use-mssql-native-backup |
<true|false> |
If true, a backup is created using the native Microsoft SQL functionality. Used only with the Note: We recommend that you set the option to
Note:
The option will not work with remote Microsoft SQL databases unless you configure a network directory on the server where the remote Microsoft SQL database is installed. You can do so in Tools & Settings > Database Servers (under “Applications & Databases”). |
To configure running of the weekly scheduled backup task on the Plesk server at 01:15 a.m using the native Microsoft SQL functionality: plesk bin scheduled-backup --configure weekly -backup-time 01:15 -use-mssql-native-backup true |
-json |
Displays the output in the JSON format (if true) or in plain text format (if false). Used only with the |
To display the list of scheduled backup tasks in the JSON format: plesk bin scheduled-backup --list -json |