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.

Manual Backup Script ??

Discussion in 'General Discussion' started by solan, Dec 6, 2003.

  1. solan

    solan Active Member

    Joined:
    Apr 11, 2003
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    #/bin/sh

    ######################
    ## Starting MySQL Backup ##
    ## Build Date 11/13/03 ##
    ## Main Process of this ##
    ## Step is to tar the main ##
    ## folders for mysql and ##
    ## and ftp to backup ##
    ######################

    echo ."Starting MySQL Backup".;
    cd /home
    tgz -cf mysql_full_%date%.tgz /var/lib/mysql
    ftp ftp.someftpsomewhere.com
    username
    password
    cd mysql_bk
    put /home/mysql_full_%date%.tgz mysql_full_%date%.tgz
    close
    bye
    rm -rf mysql_full_%date%.tgZ

    ######################
    ## Starting Profile Backup ##
    ## Build Date 11/13/03 ##
    ## Backup Profile Files ##
    ## and ftp to ##
    ## solan.no-ip.com ##
    ######################

    echo ."Starting Profile Backup".;

    cd /home
    ##if exist site_full_%date%.tgz
    ## exit;


    ##if not exist site_full_%date%.tgr
    tgz -cf site_full_%date%.tgz /home/*
    md5sum site_full_%date%.tgz >> site.log
    ftp ftp.someftpsomewhere.com
    username
    password
    cd site_bk
    put /home/site.log site.log
    put /home/site_full_%date%.tgz site_full_%date%.tgz
    bye
    ##md5sum site_full_%date%.tgz >> site.log
    rm -rf site_full_%date%.tgz

    echo ."Finished with the backup".
    echo ."Date = %date% ".
    echo ."MD5 completed hopefully".;

    exit



    ---------------------------------------------
    I'm not sure if this would totaly work, haven't tried it out yet but I just want some way of doing a manual backup offsite to a server/home machine so I know its done, and not have to wait for cpanel's timed backup to complete its process..
     
  2. solan

    solan Active Member

    Joined:
    Apr 11, 2003
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    well looking at it after I wrote that.. I know there are alot of errors.. so whatever guys.. If you want to help fix it sure.. if not I'll post a working copy later.
     
Loading...

Share This Page