Automated Remote FTP Backup shell script
Saving the data from the server may be a problem, especially if you forget about it. Unfortunately the solution provided by PLESK is not always the best one, thus we have tried to come up with a backup alternative.
The steps we recommend are :
- Setting/Saving the database daily, with upload on a weekly FTP server
- Setting/Saving the data on a weekly basis and uploading on a FTP server
When you take a dedicated server, usually the company providing it, alocates a FTP space as well for backup for an extra cost or even included in the cost of the server. This space may be accessed only from their internal network, offering more security for protecting the data. Let's see what we need to do in this direction.
Features:
DESCRIPTION | FREE VERSION | PRO VERSION |
---|---|---|
Will dump daily the databases (based on AutoMySQLBackup shell script) | YES | YES |
Will arhive directories what you define (we use usually /etc/ and /var/www/vhosts/*/). | YES | YES |
Have GPG encryption. (switch ON/OFF) | YES | YES |
Will upload to remote FTP, weekly (or can daily) | YES | YES |
Will send mail to ADMIN about job. | YES | YES |
Will report from remote FTP all files for disk space usage and will also delete files from there. | YES | YES |
Can restore file from Remote FTP. | YES | YES |
Split large files into 1GB. | YES | - |
Can archive in multiple files (one file for each domain) | NO | YES |
Can exclude files (avi, mov, etc) | NO | YES |
Archive MONDAY-SUNDAY with excluded files, SATURDAY full backup | NO | YES |
PRICE | FREE | 29 USD |
Setting/Saving the database on a daily basis (locally)
Downoad the automysqlbackup script from our server, modified in such a way that it creates separate folders for each saving. Thus you may search for a certain database very easily. Copy it on the dedicated server, in the /etc/cron.daily/, execute
wget -O /etc/cron.daily/automysqlbackup.sh http://www.grafxsoftware.com/download/backup-plesk/automysqlbackup.shchmod 700 /etc/cron.daily/automysqlbackup.sh
folder and change the execution rights.
Edit the file and modify (or not) BACKUPDIR="/home/backups" (if you maintain this setting, you have to create the folder), MAILADDR="YOUR-EMAIL-HERE", and you may leave the rest of the information unmodified.
Setting/Saving the data on a weekly basis and uploading on a FTP server
Download the gfx_backup.sh script and upload it to your server (PRO version is not available for free download, only after purchase).
Execute the following commands.
mkdir /home/backupsmkdir /root/backup_scriptcd /root/backup_scriptwget -O /root/backup_script/gfx_backup.sh http://www.grafxsoftware.com/download/backup-plesk/gfx_backup.shwget -O /etc/cron.weekly/execute_weekly_backup.sh http://www.grafxsoftware.com/download/backup-plesk/execute_weekly_backup.shchmod 700 /etc/cron.weekly/execute_weekly_backup.shchmod 700 /root/backup_script/gfx_backup.sh
Edit /root/backup_script/gfx_backup.sh and set (compulsory)
ROOTDIR="/root/backup_script/"
DIRS="/etc /home/backups/ /var/www/httpd/vhosts"
FTPD="/"
FTPU="USERNAME"
FTPP="PASSWORD"
FTPS="IP-OF-YOUR-SERVER"
EMAILID="YOUR-EMAIL-HERE"
After saving these settings, call the scipt as folows.
- sh /root/backup_script/gfx_backup.sh --backup
- sh /root/backup_script/gfx_backup.sh --restore
- sh /root/backup_script/gfx_backup.sh --report
- sh /root/backup_script/gfx_backup.sh --help
Any bug/ideea shuld be sent via our contact form.
Order PRO version here.
HOW-TO setup Plesk with Samba Share and OpenVPN on CentOS - 15 April 2010
HOW-TO - Not get Plesk Certificate Error or get rid off "This Connection is Untrusted" message. - 23 March 2010
HOW-TO configure PLESK with NGinx (proxy reverse) - 15 March 2010
HOW-TO install ffmpeg, Mplayer, mencoder,FLVtool2 and Yamdi on Plesk Linux based server - 25 September 2009
HOW-TO restart automatically on Linux Kernel Panic if hanging on boot - 23 September 2009
Web Site hacked, iframe inserted, where to start? - 10 August 2009
Spam blacklist unlisting from sorbs.net - 31 July 2009
How to find out PLESK admin password? - 12 July 2009
Plesk 9.2.x - Postfix SMTP authentication error - 16 May 2009