By default all backup data is stored in the directory /var/lib/psa/dumps .
To change the default backup location connect to the Plesk server via SSH and modify the backup location in the Plesk configuration file /etc/psa/psa.conf by changing the value of DUMP_D.
First we need to mount the backup volume allocated to our new Ubuntu Plesk 17.8 on 18.04 droplet with Digital Ocean:
1 2 3 4 5 6 7 8 | # Create a mount point for your volume: $ mkdir -p /mnt/volume_lon1_03 # Mount your volume at the newly-created mount point: $ mount -o discard,defaults,noatime /dev/disk/by-id/scsi-0DO_Volume_volume-lon1-03 /mnt/volume_lon1_03 # Change fstab so the volume will be mounted after a reboot $ echo '/dev/disk/by-id/scsi-0DO_Volume_volume-lon1-03 /mnt/volume_lon1_03 ext4 defaults,nofail,discard 0 0' | sudo tee -a /etc/fstab |
Next edit the psa.conf file:
1 | $ nano /etc/psa/psa.conf |
Find the backups directory variable:
1 2 3 4 | # Backups directory DUMP_D /var/lib/psa/dumps # Backups temporary directory. DUMP_TMP_D should not be inside of (or equal to) DUMP_D. DUMP_TMP_D /tmp |
and update:
1 2 3 4 | # Backups directory DUMP_D /mnt/volume_lon1_03 # Backups temporary directory. DUMP_TMP_D should not be inside of (or equal to) DUMP_D. DUMP_TMP_D /tmp |
Save the file and verify that the directory has been changed:
1 2 | $ cat /etc/psa/psa.conf | grep -w DUMP_D DUMP_D /mnt/volume-lon1-03 |
If this isn’t a new droplet, move all previous backup data from the old location to the new:
1 2 | $ mv /var/lib/psa/dumps/* /mnt/volume_lon1_03/ $ mv /var/lib/psa/dumps/.discovered/ /mnt/volume_lon1_03/ |
Restart the sw-cp-server service:
1 | $ service sw-cp-server restart |
Note, sometimes is is necessary to change ownership of a new backup directory, for example:
1 2 | $ mkdir /pleskBKS $ chown psaadm:psaadm /pleskBKS |