1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Automated Remote FTP Backup shell script.

Discussion in 'Plesk for Linux - 8.x and Older' started by lvalics, Oct 9, 2006.

  1. lvalics

    lvalics Silver Pleskian Plesk Guru

    36
    43%
    Joined:
    Jun 20, 2003
    Messages:
    965
    Likes Received:
    32
    Location:
    Romania
    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.
     
  2. breun

    breun Golden Pleskian

    29
     
    Joined:
    Jun 28, 2005
    Messages:
    1,647
    Likes Received:
    0
    I already created something like this myself, but for those who didn't this looks pretty good.
     
  3. Amin Taheri

    Amin Taheri Golden Pleskian Plesk Certified Professional

    33
     
    Joined:
    Jul 5, 2007
    Messages:
    1,398
    Likes Received:
    1
    Location:
    Seattle Area
    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 :)
     
  4. lvalics

    lvalics Silver Pleskian Plesk Guru

    36
    43%
    Joined:
    Jun 20, 2003
    Messages:
    965
    Likes Received:
    32
    Location:
    Romania
    If you improve it, feel free to send it to us :) There is room for improvements.
     
  5. Amin Taheri

    Amin Taheri Golden Pleskian Plesk Certified Professional

    33
     
    Joined:
    Jul 5, 2007
    Messages:
    1,398
    Likes Received:
    1
    Location:
    Seattle Area
    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
     
  6. irlamp

    irlamp Guest

    0
     

    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
     
  7. shoggy24

    shoggy24 Regular Pleskian

    25
    57%
    Joined:
    Apr 5, 2007
    Messages:
    198
    Likes Received:
    0
    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.
     
  8. lvalics

    lvalics Silver Pleskian Plesk Guru

    36
    43%
    Joined:
    Jun 20, 2003
    Messages:
    965
    Likes Received:
    32
    Location:
    Romania
    We think lftp is crashed, can you try reinstall?
     
  9. shoggy24

    shoggy24 Regular Pleskian

    25
    57%
    Joined:
    Apr 5, 2007
    Messages:
    198
    Likes Received:
    0
    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.
     
  10. lvalics

    lvalics Silver Pleskian Plesk Guru

    36
    43%
    Joined:
    Jun 20, 2003
    Messages:
    965
    Likes Received:
    32
    Location:
    Romania
    Coul be that you do not have enough space there??
     
  11. shoggy24

    shoggy24 Regular Pleskian

    25
    57%
    Joined:
    Apr 5, 2007
    Messages:
    198
    Likes Received:
    0
    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.
     
  12. lvalics

    lvalics Silver Pleskian Plesk Guru

    36
    43%
    Joined:
    Jun 20, 2003
    Messages:
    965
    Likes Received:
    32
    Location:
    Romania
  13. siraj

    siraj Guest

    0
     
    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
     
  14. lvalics

    lvalics Silver Pleskian Plesk Guru

    36
    43%
    Joined:
    Jun 20, 2003
    Messages:
    965
    Likes Received:
    32
    Location:
    Romania
    Please explain in more details.
     
  15. StefWeidm

    StefWeidm New Pleskian

    19
    35%
    Joined:
    Sep 1, 2009
    Messages:
    9
    Likes Received:
    0
    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.
     
  16. lvalics

    lvalics Silver Pleskian Plesk Guru

    36
    43%
    Joined:
    Jun 20, 2003
    Messages:
    965
    Likes Received:
    32
    Location:
    Romania
    Please explain in detail, I cannot figure out what you have done.
     
Loading...