Applicable to:
- Plesk for Linux
Question
How to change the location for Plesk backup files in Linux?
Answer
By default, all backup data is stored in the directory /var/lib/psa/dumps
.
To change the default backup location, follow these steps:
-
Connect to a Plesk server via SSH.
-
Create a new directory for backups. In these example, we are using
/plesk_backups
:# mkdir /plesk_backups
-
Set necessary ownership for the created directory:
# chown psaadm:psaadm /plesk_backups
-
Modify the backup location in the Plesk configuration file
/etc/psa/psa.conf
:4.1. Open the file
/etc/psa/psa.conf
in a text editor (for example, vi editor).4.2. Change the value of DUMP_D to the created directory from step 2:
CONFIG_TEXT: # Backups directory
DUMP_D /plesk_backups4.3. Save the changes and close the file.
4.4. Verify that the directory has been changed:
# cat /etc/psa/psa.conf | grep -w DUMP_D
DUMP_D /plesk_backups -
Move all backup data and the hidden .discovered directory from the old location to new:
# mv /var/lib/psa/dumps/* /plesk_backups/
# mv /var/lib/psa/dumps/.discovered/ /plesk_backups/ -
Restart the "sw-cp-server" service:
# service sw-cp-server restart
Now all backup files will be stored in the directory/plesk_backups
.
Comments
2 comments
Hi, i have changed that Backup Location and Backup works but Plesk Fails to Upgrade/ Update...
Some Errors:
"chown: changing ownership of '/mnt/dumps-box2/mysql.preupgrade.17.5.3-17.5.3.20180424-092657.dump.gz': Permission denied"
"*** problem report ***
ERROR while trying to backup MySQL database
Check the error reason(see log file: /var/log/plesk/install/plesk_17.5.3_installation.log), fix and try again"
I already chown psaadm and double checked that with new Location.
@Lenor
Hi, you can check workaround from https://support.plesk.com/hc/en-us/articles/213949225-Plesk-update-or-upgrade-failed-ERROR-while-trying-to-backup-MySQL-database article.
Please sign in to leave a comment.