Backing Up Your Data

To back up all data, including server and control panel configuration, remote database servers, license keys, user accounts, Web sites, databases, and mailboxes with e-mail messages, run the command:

/plesk_installation_directory/bin/pleskbackup all <backup file name>

Note: If you want to save backup files to an FTP server, specify a URL like ftp://[<login>[:<password>]@]<server>/<filepath> instead of <backup file name>. You can specify the password for access to the FTP server using the FTP_PASSWORD environment variable.

To back up all user accounts with all users' sites, run the command:

/plesk_installation_directory/bin/pleskbackup clients <backup file name>

To back up all sites hosted on server without storing details for each client account, run the command:

/plesk_installation_directory/bin/pleskbackup domains <backup file name>

To back up selected user accounts with Web sites:

  1. Create a text file and list there the control panel login names of the clients whose accounts you wish to back up, one login name per line. For example:

    client1

    client2

  2. Save the file.
  3. Run the command /plesk_installation_directory/bin/pleskbackup clients <backup file name> -f=<file name>

    where <file name> is the file listing the objects you wish to backup that you created at the step 1.

To back up selected Web sites:

  1. Create a text file and list there the domain names of the sites that you wish to back up, one domain name per line. For example:

    domain1.com

    domain2.com

  2. Save the file.
  3. Run the command /plesk_installation_directory/bin/pleskbackup domains <backup file name> -f=<file name>

    where <file name> is the file listing the objects you wish to backup that you created at the step 1.

To back up a specific user account with all user's web sites, run the command:

echo 'client's login name' | /plesk_installation_directory/bin/pleskbackup clients <backup file name> -

To back up a specific web site, run the command:

echo 'domain name' | /plesk_installation_directory/bin/pleskbackup domains <backup file name> -list -

Table 1. Pleskbackup utility commands and options.

Available commands

Command

Arguments and Syntax

Description

all

backup file name

Backs up all data related to your installation of Plesk and saves them into file under the specified name.

clients

backup file name

Backs up all data related to all or selected client accounts (including web sites) and saves them to file under the specified name. For a selective backup of client accounts, compile a list of client accounts, save it in a file, and then use the --clients option together with the -list <file name> argument.

domains

backup file name

Backs up all data related to hosted domains/web sites and saves them to file under the specified name. For a selective backup of domains/web sites, compile a list of domain names, save it in a file, and then use the --domains option together with the -list <file name> argument.

help or -h

 

Shows the available commands and options.

Available options

-c

 

Backs up only settings related to control panel, without the content of sites, mailboxes or databases.

-s

-s=<file size>

Splits the created backup file to parts. The size can be specified in kilobytes (<size>K), megabytes (<size>M) and gigabytes (<size>G).

The '-s' option without an argument selects the default file size of 2 gigabytes.

-f

 

-f=<file name>

 

Specifies the path to file that contains a list of objects (clients' login names or domain names) that you prepared for a selective backup.

You can use the -f argument with hyphen instead of file name, if you wish the pleskbackup utility to read data from stdin. For example: echo 'domain.com' | pleskbackup --domains <backup file name> -f -

--exclude

 

Specifies the items (domain names or clients' login names separated with white spaces) that should not be backed up.

--exclude-file

 

Specifies the file that contains a list of items that should not be backed up.

-v

 

Shows information about backup progress.