Plesk backup temporary file filling disk

It appears that the Plesk backup utility (pleskbackup Linux) writes to a temporary file prior to moving it to the final destination you’ve specified on the command line.

ie. When running:

/usr/local/psa/bin/pleskbackup all /mnt/nfsshare/pleskbackup.bak

Plesk writes the whole backup file to the local disk in /var/lib/psa/dumps/tmp/:

# ls -lah /var/lib/psa/dumps/tmp/
total 1.9G
drwx—— 2 psaadm psaadm 4.0K 2009-02-09 18:38 .
drwxr-xr-x 3 psaadm psaadm 4.0K 2009-02-09 10:17 ..
-rw-r–r– 1 root   root   1.9G 2009-02-09 18:44 fileTFzx5u

This is a problem when you’re low on disk space on the machine and you’re mounting a NFS drive to backup to… it obviously fills the disk quickly and the backup fails.


  • Restoration of the backup files created by the script below has not yet been tested
  • Disk may still fill up due to very large site… may have to symlink the psa tmp directory onto the NFS mount
  • Tested with psabackup from Plesk version 8.2.1
  • It turned out that the site used over 60% of available disk space so filled the disk every time.  Plus, Plesk backup/restore on Linux has known issues for site backup files larger than 2GB in size.  Will have to write a manual backup script to overcome this.

The script looked like below, but, will need to be updated to backup sites too large for pleskbackup to handle.  This may or may not work for you depending on the Plesk version you are using… use at own risk.


dopleskbu () {
MYSQLPASS=`cat /etc/psa/.psa.shadow`
for DOMAIN in `mysql -Ns -uadmin -p$MYSQLPASS -Dpsa -e “select name from domains”`;
do /usr/local/psa/bin/pleskbackup domains $DOMAIN –exclude=DOMAIN_IF_YOU_WANT $FPATH.$DOMAIN.bak;
if [ $? == 0 ]; then
logger “$0 $DOMAIN backup complete”
logger “$0 $DOMAIN backup error”


# Main calls


Plesk restore didn’t work

Having a 12GB Plesk backup file is all well and good except if the domain you want to restore is 7GB in size (Plesk 8.1 Linux).  The Plesk restore died every time I tried to restore this specific domain.


Explains 3 different methods for restoring data from the plesk backup file manually.  Method 1 was to open the file in a mail client, but, 12GB is a bit large for that. Method two suggested using munpack, which, I tried, but hit a 2GB limit and it said:

# cat DUMP_FILE | munpack
DOMAIN.TLD.httpdocs (application/octet-stream)
File size limit exceeded

So, it was time for method 3…. which was very manual and very slow.  It included grepping through the 12GB file for the tar data of httpdocs for the specific website and databases.

Something like:

# egrep -an '(^--_----------)|(' ./testdom.com_dump | grep -A1 "Content-Type"
2023:Content-Type: application/octet-stream; name=""

“Increase the first line number on 2 and  subtract 1 from the second line number, then run:”

head -n 3805  ./testdom.com_dump | tail +2025  > htdocs.tar

At least with this method the site data was restored.  There wasn’t any mail to try and restore so that was fine.  Also, the previous restore had restored the databases before failing so didn’t need to extract those.