The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Cron job to FTP to remote cpanel server

Discussion in 'General Discussion' started by PyRoAcIdK, Apr 30, 2005.

  1. PyRoAcIdK

    PyRoAcIdK Active Member

    Joined:
    Jan 15, 2005
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Melbourne, Australia
    Hi Guys,
    One of my clients has recently purshased a package at a netregistry, because of there australian payment gateway.
    The Customer has cron and ftp access, and wanted to automate a daily backup of his customers accounts.

    so far i have the following code i have worked out:
    Code:
    mysqldump --all-databases --add-drop-table -c -f -F -a -q -u USERNAME --password="PASSWORD" > /home/aussiestore/`date '+%Y%m%d'`.sql 
    gzip /home/aussiestore/`date '+%Y%m%d'`.sql
    
    now i need to get it to ftp `date '+%Y%m%d'`.sql.gz to my server.
    Please NOTE: His ftp is username and passworded, so please refer to in example.
    then
    Code:
    rm -rf `date '+%Y%m%d'`.sql.gz
    Thanks in advance.
     
Loading...

Share This Page