PLESK 7.5 RELOADED

Chapter 2. Backing up the configuration information and the data

psadump -f <dumpfile> [-z] [--no-internal-zip] [--clients-logins=<client-logins-file> | --clients-ids=<client-ids-file> | --domains-names=<domain-names-file> | --domains-ids=<domain-ids-file>] [--nostop] [--force] [--tar-ignore-failed-read]

psadump [--version]

psadump [-h]

Redirecting the output

The -f argument serves for specifying the file, to which the output of the psadump utility will be directed. The name of this file is specified by the <dumpfile> parameter.

IMPORTANT

The -f argument is a required argument.

There are four options available:

  • <dumpfile> = /fullpath/filename - you can specify the exact name of the file, to which the output will be directed. In other words, you specify the full name of the future dump-file

    For example, execute psadump -f /root/psa_backup/my_psa_backup_file to back up the information and store it in the file /root/psa_backup/my_psa_backup_file

  • <dumpfile> = /fullpath/ - you can specify only the name of the directory, at which the dump-file will be created. In this case, the default name will be used for the dump-file, which will locate in the specified directory

    For example, execute psadump -f /root/psa_backup/ to back up the information and store it in the directory /root/psa_backup/ under the default name

    NOTE

    The default dump-file name is generated automatically at the moment of executing psadump.

  • <dumpfile> = - - you can direct the output to stdout. This can be very useful if you are executing the distributed backup/restore (backing up Plesk at one machine and restoring it at another machine) or if you wish to split the dump-file into chunks (piping the output to split), which can be used as a workaround for 2-GB limit on certain file systems.

    For example, execute psadump -f - | split -b1000m - dump. to have the backed up information stored in files named dump.aa, dump.ab, dump.ac, etc., each 1000MB in size, except maybe for the last one, which will be less than or equal in size to the limit value.

    For examples and instructions on distributed backup/restore see chapter Distributed backup and restore.

  • To create a backup file on the FTP server, use the command ./psadump -f ftp://<login>:<password>@<server>/<dump_file_path>

Compression options

The psadump utility allows various options of compressing the resulting dump-file:

  • Specifying the -z argument makes psadump compress the dump-file after it was generated with gzip.

  • Specifying the --no-internal-zip argument tells psadump not to compress the separate segments of the dump-file, which they are by default.

Selective backup

You can choose to back up only the data associated with certain clients, or certain domains. You can have the psadump utility back up a list of clients or domains, or back up all client accounts or domains except for the listed ones.

Backing up selected client accounts

You can choose to compile a list of client accounts, that should or should not be backed up. The list can comprise either control panel login names or client account IDs.

  • To specify the client accounts by their login use the --clients-logins argument. The corresponding file must contain the logins of the clients, whose account data you wish to back up, one login per line, no other separators.

    For example, execute psadump -f /root/psa_backup/my_psa_backup_file --clients-logins=/root/psa_backup/my_client_logins_file to execute backing up the data belonging to the clients listed by their logins in the file /root/psa_backup/my_client_logins_file. See chapter Configuration file examples section Client logins file for an example of the client logins file.

  • To specify a list of client accounts that should not be backed up, use the --clients-logins-skip argument. The corresponding file must contain a list of login names of the clients, whose accounts you do not need to back up.

    For example, execute psadump -f /root/psa_backup/my_psa_backup_file --clients-logins-skip=/root/psa_backup/my_client_logins_file to back up the data belonging to all client accounts except for those listed in the file /root/psa_backup/my_client_logins_file. See chapter Configuration file examples section Client logins file for an example of the client logins file.

  • To specify the client accounts by the client identifiers use the --clients-ids argument. The corresponding file of client identifiers must contain the identifiers of the clients, whose account data you wish to back up, one identifier per line, no other separators.

    NOTE

    The client identifiers are the Plesk-related unique identifiers assigned to all clients. They can be found in the Plesk server database, table clients column id.

    For example, execute psadump -f /root/psa_backup/my_psa_backup_file --clients-ids=/root/psa_backup/my_client_ids_file to execute backing up the data belonging to the clients listed by their identifiers in the file /root/psa_backup/my_client_ids_file. See chapter Configuration file examples section Client id’s file for an example of the client identifiers file.

  • To specify a list of client accounts that should not be backed up, use the --clients-ids-skip argument. The corresponding file must contain a list of identifiers of client accounts that you do not need to back up.

    For example, execute psadump -f /root/psa_backup/my_psa_backup_file --clients-ids-skip=/root/psa_backup/my_client_ids_file to back up the data belonging to all client accounts except for those listed in the file /root/psa_backup/my_client_ids_file. See chapter Configuration file examples section Client id’s file for an example of the client ids file.

Backing up selected domains

You can choose to compile a list of domain names that should or should not be backed up. The list can comprise either domain names or the identifiers assigned to the domains.

  • To specify the domains by their name use the --domains-names argument. The corresponding file of domain names must contain the names of the domains, whose content you wish to back up, one domain name per line, no other separators.

    For example, execute psadump -f /root/psa_backup/my_psa_backup_file --domains-names=/root/psa_backup/my_domain_names_file to execute backing up the content of the domains listed by their names in the file /root/psa_backup/my_domain_names_file. See chapter Configuration file examples section Domain names file for an example of the domain names file.

  • To specify a list of domains that should not be backed up, use the --domains-names-skip argument. The corresponding file must contain a list of doman names, whose content you do not need to back up.

    For example, execute psadump -f /root/psa_backup/my_psa_backup_file --domains-names-skip=/root/psa_backup/my_domain_names_file to back up the data belonging to all domain names except for those listed in the file /root/psa_backup/my_domain_names_file. See chapter Configuration file examples section Domain names file for an example of the domain names file.

  • To specify the domains by the domain identifiers use the --domains-ids argument. The corresponding file of domain identifiers must contain the identifiers of the domains, whose content you wish to back up, one identifier per line, no other separators.

    NOTE

    The domain identifiers are the Plesk-related unique identifiers assigned to all domains. They can be found in the Plesk server database, table domains column id.

    For example, execute psadump -f /root/psa_backup/my_psa_backup_file --domains-ids=/root/psa_backup/my_domain_ids_file to execute backing up the content of the domains listed by their identifiers in the file /root/psa_backup/my_domain_ids_file. See chapter Configuration file examples section Domain id’s file for an example of the domain identifiers file.

  • To specify a list of domains that should not be backed up, use the --domains-ids-skip argument. The corresponding file must contain a list of identifiers assigned to domains, whose content you do not need to back up.

    For example, execute psadump -f /root/psa_backup/my_psa_backup_file --domains-ids-skip=/root/psa_backup/my_domain_ids_file to back up the data belonging to all domain names except for those listed in the file /root/psa_backup/my_domain_ids_file. See chapter Configuration file examples section Domain id’s file for an example of the domain identifiers file.

Other options

  • Use the --force argument to overwrite the existing dump-file without prompting for confirmation.

  • Use the --tar-ignore-failed-read argument to make tar not exit with non-zero status on unreadable files (see argument --ignore-failed-read for tar).

  • If you do not want to stop all of the Plesk services when executing backup, include the --nostop argument.

    IMPORTANT

    If during the process of backing up with this option some changes are made through the Plesk control panel the resulting dump may be generated incorrectly or the process itself may fail.

    You are strongly advised to stop the admin Apache, so as to prevent the clients changing data through the control panel in the process of executing a backup.

    For the RPM version execute: service psa stop1

    For the standard version execute: /usr/local/psa/rc.d/psa stop1

  • In order to prevent certain user data from being changed during the backup process when executing psadump with option --nostop, each domain is deactivated before backing up its data, and then reactivated again. If you wish to back up data without deactivating domains, use option --nostop-domain along with --nostop. Just note that in this case there is a possibility that some data can be modified through the control panel in the course of backup.

  • The --do-not-dump-logs option allows to not back up the virtual host log files.

  • To view the version of the Backup/Restore Utilities, execute psadump with the --version argument.

  • Executing psadump -h will display a brief help to remind you of the available options.


to top