The main goal of the Plesk Server Backup Script is to reduce disk space usage and memory consumption during backup procedures, especially when backing up to the FTP repository.The script makes a backup dump for the entire Plesk server and implements a per-domain backup algorithm as well.
Please feel free to discuss the Plesk Server Backup Script in this special thread on the Plesk Forum .
On Unix: php -d safe_mode=0 fullbackup.php
On Windows: "%plesk_bin%\\php" -d auto_prepend_file="" fullbackup.php
- output is
-b Backup to local repository
-b -o <output_dir> Backup to directory
-b -o ftp://<login>:<password>@<server>/<output_dir> Backup to FTP server
-p <backup_password> Set backup password, supported since
Plesk 11 and higher
-e <backup_info_xml> <output_file> Export backup from local repository to file
- input is
-r fullbackup_<datestamp> Restore fullbackup_<datestamp>
-r ftp://<login>:<password>@<server>/fullbackup_<datestamp> Restore fullbackup_<datestamp> from FTP
Warning: Restoring functionality of the fullbackup.php is intended for use on the same server only (i.e. server with same IP addresses and overall server configuration). Please feel free to submit requests for improvements on the Plesk Forum .
As a possible scenario, you can use this script in Scheduled Tasks (
Tools & Settings > Tools & Resources > Scheduled Tasks
) for the
user to create a "cronjob" task for a full server backup. (Do not forget to specify the full path in the script command.)
./fullbackup.php -b -o <output_dir> -p <passwd>
It backs up whole server storing backup in
and protecting backup with password
. Password protection encrypts all passwords in backup and such backup can't be restored w/o specifying correct password.
./fullbackup.php -r fullbackup_<datestamp> -p <passwd>
It restores backup created previously by fullbackup.php using specified password.
./fullbackup.php -e /var/lib/psa/dumps/backup_info.xml <output_file>
It exports backup_info.xml with all related files from server local repository to single archive
is an ordinary Plesk backup archive and later it can be restored in a usual way using pleskrestore utility or via Plesk UI with initial uploading.
Not only server level backup can be exported, but also client or domain level as:
./fullbackup.php -e /var/lib/psa/dumps/clients/<client>/domains/<domain>/domain_backup_info.xml <output_file>
How to restore backups on the other server:
Backup exporting is required if you want to restore these backups on another server. Plesk creates backups in local repository with passwords encrypted by Plesk encryption key. Another Plesk has different encryption key, so these backups can't be restored . Exporting is the same operation as downloading backup from Plesk UI or uploading backup to FTP repository - it decrypts passwords and stores them in plain text.
Best practise in this case is to have external FTP repository and store backups on it. In case of disaster and full server unavailability it will allow you to restore backups on new Plesk Panel server with minimum time and business impact.
Additional information :
has following heading:
It means that it can be executed directly as:
because interpreter is set to
# chmod u+x fullbackup.php
is required for proper script execution.