sallyanne
Aug 4 2003, 01:36 PM
What is the best way to backup Plesk 6 config, etc, such as vhosts, email, mysql, web content, etc.
I am using a Dual Xeon with 2 x 73GB hard drives. Is it possible to backup one to the other? is anyone doing this? if so, how?
Comments and advice greatly appreciated. Thanks. Sallyanne.
sallyanne
Aug 7 2003, 04:35 PM
Does anyone have any ideas on the best way to backup the Plesk crucial files and server data?
mOjO_420
Aug 9 2003, 04:35 AM
i'm wondering this myself...
there will be a plesk6 backup module add-on... but i think its still in development... i hope plesk gets their butts moving on it soon....
Fletch
Aug 9 2003, 09:39 AM
The Plesk 6.0 backup scripts aren't available yet. Until they are released, I've been using the following script that was posted by a Plesk user to the Plesk forum. I modified it to gzip the tar files to better facilitate transport.
This is not an official Plesk backup script.
CODE
#!/bin/sh
# Script to Backup Plesk
# Set Vars
# Backup Directory
backupdir="/backup"
# Date and format of date - for date stamping files
date=`/bin/date "+%Y%m%d-%H%M%S"`
# Backup Script Below
# Stop Plesk
/etc/init.d/psa stop
# Backup MySQL
/bin/tar -czf $backupdir/mysql-$date.tgz /var/lib/mysql
# Restart Plesk
/etc/init.d/psa start
# check for qmail-send and restart qmail.
sleep 10
# Qmail PID
qmailpid=`/bin/ps axww | /bin/grep qmail-send | /bin/grep -v grep | /bin/sed -e 's/^ *//' -e 's/ .*//'`
/bin/kill -9 $qmailpid
sleep 5
qmailpid=`/bin/ps axww | /bin/grep qmail-send | /bin/grep -v grep | /bin/sed -e 's/^ *//' -e 's/ .*//'`
if [ -z "${qmailpid}" ]
then {
echo "Restarted qmail"
/etc/init.d/qmail start
}
fi
# Backup Plesk Data
/bin/tar -czf $backupdir/usr-$date.tgz /usr
/bin/tar -czf $backupdir/etc-$date.tgz /etc
/bin/tar -czf $backupdir/var-$date.tgz /var
/bin/tar -czf $backupdir/home-$date.tgz /home
# Remove Stale Backup Files from Backup Dir
/usr/bin/find $backupdir -name "etc*.tgz" -mtime +2 -exec rm "{}" ";"
/usr/bin/find $backupdir -name "usr*.tgz" -mtime +2 -exec rm "{}" ";"
/usr/bin/find $backupdir -name "mysql*.tgz" -mtime +2 -exec rm "{}" ";"
/usr/bin/find $backupdir -name "var*.tgz" -mtime +2 -exec rm "{}" ";"
/usr/bin/find $backupdir -name "home*.tgz" -mtime +1 -exec rm "{}" ";"
# Done
mOjO_420
Aug 10 2003, 08:29 AM
hmmm.. why shutdown mysql though?
i mean.. cant you just do a dump of contents without shutting it down?