Changing the Plesk Backup Directory
Introduction
This article explains how to customize the default backup directory for the Backup Manager in the Plesk Control Panel. This change allows you to control the directory where the Plesk Backup Manager stores backups. This can, for example, prevent backups from being stored on your server’s NVMe storage.
Prerequisites
- Root user
- Server with Plesk Control Panel
This section of the article assumes you have an active SSH session as the root user.
For this guide, we recommend using a secondary “HDD” hard drive on our V-Servers. To learn how to add and format one, see the following Help Center article: Add a Hard Drive
Customizing the Default Directory
Connect to your Plesk server via SSH as the root user. You can find the relevant login credentials and all other connection information in the respective password vault for your server in the Customer Center.
Once you’re connected, use the following command to create the new backup directory on the secondary hard drive:
mkdir -p /mnt/data/plesk/dumps Next, adjust the permissions for the directory you just created:
chown -R psaadm:psaadm /mnt/data/plesk
chmod -R 755 /mnt/data/plesk Next, you must edit the Plesk configuration file:
nano /etc/psa/psa.conf Adjust it as follows:
# Backups directory
#DUMP_D /var/lib/psa/dumps --> Old entry
DUMP_D /mnt/data/plesk/dumps --> New entry Next, you must move all existing backups to the new backup directory so that they remain 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 After this, the Backup Manager will use the configured path to store future backups.