• Inviting everyone who uses WordPress management tools in Plesk
    The Plesk team is conducting a 60-minute research session that includes an interview and a moderated usability test.
    To participate, please use this link .
    Your experience will help shape product decisions and ensure the tools better support real-world use cases.

Backup options

C

cosmicfantasia

Guest
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... :)
 
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

Code:
#!/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`.*
 
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.

Code:
#!/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`[b]_`date +%a`[/b].
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`[b]_`date +%a`[/b].*
 
Back
Top