• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Automated Remote FTP Backup shell script.

lvalics

Silver Pleskian
Plesk Guru
Hi all,

We have developed a small script (for our use but why not share it?).
This script with a help of other great script (AutoMySQLBackup) will backup all MySQL databases (dump it) then also will archive some directories and then connect to a remote FTP server and upload it.

Some of you will say ... PLESK 8 have some tools for backup and even remote FTP.

Indeed. Our solution is different in some way.
1. Will dump daily the databases (based on AutoMySQLBackup shell script)
2. Will arhive directories what you define (we use usually /etc/ and /var/www/vhosts/*/).
3. Have GPG encryption. (switch ON/OFF)
4. Will upload to remote FTP, weekly (or can daily)
5. Will send mail to ADMIN about job.
6. Will report from remote FTP all files for disk space usage and will also delete files from there.
7. Can restore file from Remote FTP.
8. More small settings.

You can download the files from
http://www.web-hosting-control-panel-addons.com/binaries/gfx_backup/gfx_backup

You need to setup this file like in file comments.
Then also download
http://www.web-hosting-control-panel-addons.com/binaries/gfx_backup/gfx_backup_cron

This will be need to copy into /etc/cron.weekly (daily)

Also you can get from http://sourceforge.net/projects/automysqlbackup/
the MySQL Backup and setup.

Any other ideea are welcome.
Hope will help.
 
I already created something like this myself, but for those who didn't this looks pretty good.
 
I know this is an old topic, and I appologize if I am ruffling any feathers by posting in it, but I wanted to say thanks for the script, I just tried it out and it works nicely. I am now customizing it and moving it to a production server to test :)
 
If you improve it, feel free to send it to us :) There is room for improvements.
 
Maybe "improvement" isnt the right word, but I was going to take out the FTP and mount a CFIS lun from our SAN to have it copied to instead
 
Hi all,

We have developed a small script (for our use but why not share it?).
This script with a help of other great script (AutoMySQLBackup) will backup all MySQL databases (dump it) then also will archive some directories and then connect to a remote FTP server and upload it.

Some of you will say ... PLESK 8 have some tools for backup and even remote FTP.

Indeed. Our solution is different in some way.
1. Will dump daily the databases (based on AutoMySQLBackup shell script)
2. Will arhive directories what you define (we use usually /etc/ and /var/www/vhosts/*/).
3. Have GPG encryption. (switch ON/OFF)
4. Will upload to remote FTP, weekly (or can daily)
5. Will send mail to ADMIN about job.
6. Will report from remote FTP all files for disk space usage and will also delete files from there.
7. Can restore file from Remote FTP.
8. More small settings.

You can download the files from
http://www.web-hosting-control-panel-addons.com/binaries/gfx_backup/gfx_backup

You need to setup this file like in file comments.
Then also download
http://www.web-hosting-control-panel-addons.com/binaries/gfx_backup/gfx_backup_cron

This will be need to copy into /etc/cron.weekly (daily)

Also you can get from http://sourceforge.net/projects/automysqlbackup/
the MySQL Backup and setup.

Any other ideea are welcome.
Hope will help.


Thanks for useful guide.

I have a question,
How can I store backup files in a folder?
we have 2 HDD on our server and we want to get backup on our second hard drive as /hdd2


thanks
 
I know this i an old thread but i was hoping this script is what i need to get a reliable backup of my system, the problem is when i run the scripts everything seem to be running just fine but it eventually fails with the following error message;
/root/backup_script/gfx_backup: line 173: 975 Segmentation fault lftp $FTPS <<EOFnding data]
user "$FTPU" "$FTPP"
cd $FTPD
lcd $BACKUP
mput *
quit
EOF

I have no idea what to do regarding this error.
 
I re-installed lftp but got the same error message and the backup failed. While monitoring i see the backup uploading the compressed file up to 700MB but then failed and deleted everything leaving only about 2MB on the ftp server.
 
Definitely not a space issue, i did found out that the issue is with backing up my /var/www folder, if i remove that folder from the list of data to backup, the other folders and database backs up just fine without problem.
 
Dear Sir,

Iam new to plesk software, we are using plesk 8.0.1 and our customer needs a direct link to backup his web site so that he can upload on another server, he doesnt want ftp access. can you please help me out
 
I think ever after upgrading my server, yum upgrade and Plesk upgrade to 9.2.2 the rsnapshot stopped working. It also seems to have overwritten my config file.

How could this have happened? It's very annoying as I now have to spend the time to set it all up and test it again.
 
Back
Top