Saturday, 24 May 2008

Plesk Backup Script

Taken from the atomic wiki (thanks Scott):

Install the required packages
  • yum install lftp
  • create /root/scripts/remote-backup
    #!/bin/sh
    #
    # Format date YYYY-MM-DD-HH-MM
    #
    date=`/bin/date +%F-%R`
    #
    # Create plesk backup
    #
    /usr/local/psa/bin/pleskbackup all /var/backup/fullbackup-$date.bak
    #
    # Connect to FTP, change directory, send files, disconect.
    #
    lftp -u username,password@# ftp.server.ip.address <<EOF
    cd /
    lcd /var/backup/
    mirror -R
    quit 0
    EOF
  • add script to crontab

all done :)

No comments:

Post a Comment