Change Plesk backup directory


Foreword

This article explains how to customize the default backup directory of the Backup Manager in the Plesk Control Panel. With the customization you can control in which directory the Plesk Backup Manager saves the backups. This can prevent backups from being stored on your server's NVMe storage, for example.


Prerequisites

  • Root user
  • Server with Plesk Control Panel


An active SSH session with the user root is required for this article section.


We recommend that you use a secondary hard disk of type "HDD" with our V-Servers for these instructions. You can find out how to add and format these in the following help center article: Add hard disk



Customization of the default directory

Connect to your Plesk server via SSH as root user. The corresponding access data and all other connection information can be found in the respective password vault of your server in the customer center.

After you have connected, use the following command to create the new backup directory on the secondary hard disk:

mkdir -p /mnt/data/plesk/dumps


In the next step, correct the permissions of the directory you have just created:

chown -R psaadm:psaadm /mnt/data/plesk
chmod -R 755 /mnt/data/plesk


The Plesk configuration file must then be edited:

nano /etc/psa/psa.conf


Customize it as follows:

# Backups directory
#DUMP_D /var/lib/psa/dumps --> Old entry
DUMP_D /mnt/data/plesk/dumps --> New entry


You must then move all existing backups to the new backup directory so that they are still available. Use the following commands to do this:

mv /var/lib/psa/dumps/* /mnt/data/plesk/dumps/
mv /var/lib/psa/dumps/.discovered/ /mnt/data/plesk/dumps/


To complete the configuration, you must restart the corresponding service:

service sw-cp-server restart


The configured path is then used to save the backups for future backups via the backup manager.