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.

Note:

  • 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.

#!/bin/bash

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”
else
logger “$0 $DOMAIN backup error”
fi
done;
}

FILENAME=pleskbackup.weekly
DIR=/mnt/backup
FPATH=$DIR/$FILENAME

# Main calls

dopleskbu
### END OF SCRIPT ###

Correct form equals no pain

Second week of the VJB program and I’ve worked out that even if my knees are feeling a bit tired/wobbly after Sunday night bball I can still do squats without the knees hurting.

Correct form reduces any aches.  The following appears to work for me whilst doing squats with assistance of the smith machine:

  • Position yourself under the bar so that the heals of your foot are below the bar.  Feet facing forward.
  • For me, it’s most comfortable if my feet are slightly less than shoulder width apart
  • Get comfortable before lifting any weights.  Repositioning the feet under weight it may hurt the knee.
  • The weight of the bar should go across the fleshy part of the shoulder/lower neck.  The bar rolls nicely into position when unlocking the bar (smith machine)
  • Gently squat down (not going too deep at the moment until strength is built up) whilst the weight goes through the heals and the glute is pushed out
  • Keep the core tight and back straight
  • Accelerate as fast as possible straight up (NOT elevating into calf raise – stay on heals of foot)

Obviously a personal trainer can instruct better on correct form, but, above works well for me.