Plesk already provides a script who's intention is to perform a full backup in a more or less machine/version/software independent manor, however, I have noticed that it doesn't necessarily backup every single property of every single application. For example, it doesn't backup and restore a lot of settings for the mailing list manager software it uses - Mailman -
An example of a full backup on Plesk, belt and braces:
dates=`date +%Y%m%d%H%M%S`
/usr/local/psa/bin/pleskbackup all /home/{myhome}/plesk-${dates}
source /root/shutdown-psa.sh
/etc/init.d/mysqld start mysqldump --all-databases --user=admin --password={mysqlrootpw} | bzip2 > /home/{myhome}/plesk-db-${dates}.sql.bz2
tar cvjf /home/{myhome}/plesk-bku-${dates}.tar.bz2 /var/www/vhosts /etc /var/lib/mailman /root/*.sh /var/qmail /home/{myhome}/plesk-db-${dates}.sql.bz2
chown {user}:{group} /home/{myhome}/plesk-db-${dates}.sql.bz2 chown {user}:{group} /home/{myhome}/plesk-bku-${dates}.tar.bz2
chown {user}:{group} /home/{myhome}/plesk-${dates}.gz
This is an example (and would need to be run as root ). The script referred to above 'shutdown-psa.sh' can be found here. Obviously it should be placed in the root directory when you have copied it to your server.
To use this scripts, please substitute:
{mysqlrootpw} : The SQL root password
{myhome}: Your home directory (its usually the same as your username)
{user}: Your username
{group}: Your Group
This runs the standard plesk backup (and also the plesk shutdown script mentioned in my previous post). It also creates a dump of the mysql database, and a file system backup of the critial data areas on your server. However before using this script, please review it carefully and make any alterations that might be suitable to your situation. If you have any doubts or questions, leave a comment and I'll see if I can help. Please of course remember to test your backups once you have made them, to be sure that this script works in your situation.
I dont know if you can help me but I in quite a jam, they upgraded my vp server to fedora core 7 with plesk 8.3, they advised me to backup my sites which I did in my previous version of plesk I believe it was 7.5 now I find out the backup file I made is not compatible with the new version of plesk, long story short they told me to login to my root with ssh client (which i have never done before) and type su - to gain access to root then to run a conversion utility and do this:
You can restore data backed up by Plesk 7.5.4 control panel. Before you restore such data, you need to log in as root to your server and run the conversion utility for each backup file created by 7.5.4 as follows:
plesk_installation_directory/bin/backup-convert.py convert -o <new backup file name> <old backup file name>, where <new backup file name> is the path to the new backup file created by the conversion utility, and <old backup file name> is a backup file created by Plesk 7.5.4.
I managed to do this however it says directory not found. I just want to restore my sites, I run 2 php oscommerce sites and I need the info in my databases that is in the backup files. Do you have any suggestions??? Thanks in advance for your consideration.
Hi Amy,
Sorry to hear of your trouble. I wonder if you could tell me the exact error. For example. If you see:
bash: plesk_installation_directory/bin/backup-convert.py: No such file or directory
That means, you need to replace 'plesk_installation_directory' with the location on your server where plesk really is. For example if it where installed in '/usr/local/psa' you would need to use:
/usr/local/psa/bin/backup-convert.py convert -o <new backup file name> <old backup file name>
Also remember, when using the old backup file name and the new backup file name, you don't need the angled brackets either, as they have a special meaning, so in practice you would use something like:
/usr/local/bin/backup-convert.py convert -o /home/amy/myconvertedbackup /home/amy/myoriginalbackup
Hope this helps.