PDA

View Full Version : Backup options


cosmicfantasia
25th October 2006, 08:06 PM
There is a lot fo talk in these forums about Plesk backups. But I haven't yet found a definitive list of all the ways backups can currently be performed.

I was wondering what people would suggest as best practice and also what to stay away from in the current Plesk because of potential problems?

Thanks,
Cosmic... :)

dw604
26th October 2006, 05:46 AM
I use a simple script for now to backup to my provider-provided backup FTP server. This is primitive and risky in that it doesn't keep more than a single days backup on the FTP server... I'm still working on the NCFTP remote commands to pull off a 3 day system. I also had some unexplainable problems with apache after backups on one server, which is why I do a restart...

Prerequisites:
yum install ncftp
mkdir /home/backup

#!/bin/sh

FTP_HOST=12.34.56.78
FTP_USER=mybackup
FTP_PASS=12345678

mkdir /home/backup/plesk 2> /dev/null
cd /home/backup/plesk
/usr/local/psa/bin/psadump -f - --nostop --do-not-dump-logs | gzip | split -b 1000m - dump-`hostname`.
echo "DONE PLESK BACKUP----\n"
echo "restarting apache... just in case...."
/sbin/service httpd stop
sleep 5
/sbin/service httpd start
/usr/sbin/apachectl graceful
# FTP to backup
ncftpput -t 15 -DD -u $FTP_USER -p $FTP_PASS $FTP_HOST /home/mybackup /home/backup/plesk/dump-`hostname`.*

exi1ed0ne
23rd November 2006, 09:40 PM
Originally posted by dw604
This is primitive and risky in that it doesn't keep more than a single days backup on the FTP server... I'm still working on the NCFTP remote commands to pull off a 3 day system.
Prerequisites:
yum install ncftp
mkdir /home/backup



Made some mods to your script. Put in Monday, Wednesday, and Friday cron jobs and your good. The only gotcha is if the number of files split produces shrinks.

#!/bin/sh

FTP_HOST=12.34.56.78
FTP_USER=mybackup
FTP_PASS=12345678

mkdir /home/backup/plesk 2> /dev/null
cd /home/backup/plesk
/usr/local/psa/bin/psadump -f - --nostop --do-not-dump-logs | gzip | split -b 1000m - dump-`hostname`_`date +%a`.
echo "DONE PLESK BACKUP----\n"
echo "restarting apache... just in case...."
/sbin/service httpd stop
sleep 5
/sbin/service httpd start
/usr/sbin/apachectl graceful
# FTP to backup
ncftpput -t 15 -DD -u $FTP_USER -p $FTP_PASS $FTP_HOST /home/mybackup /home/backup/plesk/dump-`hostname`_`date +%a`.*