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.

Backups: When is a backup done?

Discussion in 'General Discussion' started by gmagana, Jan 4, 2008.

  1. gmagana

    gmagana Active Member

    Joined:
    May 18, 2005
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    6
    As part of my disaster recovery, I like to do daily backups of backups... I run the tar command on the /backup directory (I only have daily backups enabled), and then the resulting TAR file I send to another server. On the other server I keep a certain number of these backup tar files. (I have a lot of space there :) )

    My problem recently is that cPanel stopped sending me emails when a backup job is finished... Now it sends me (and unreliably so) a mail when a backup job starts... That's kind of useless to me, I only care about when a backup job ends... I can SSH into the machine and see if the cpbackup process is running... But I would much rather get some sort of notification, or better yet, be able to schedule a job that executes when the backup ends.

    To tell the truth I don't mind doing this by hand every day, but I do mind having to babysit the machine until cpbackup ends. Depending on the server load, it ends on very different times each day.

    Does anyone have any suggestions on this for me? What could I try? I guess I could write a script, but I am a Linux programming n00b, and to tell the truth I don't have time for that (I guess I could pay someone here to write it for me though ;-) )

    Any suggestions?

    One more thing: I know there is the FTP backup option in cPanel, but there are a couple things I don't like about it: It seems to be that I need to disable local backups (ie, in /backup) in order to select it, and then it only backs up user accounts... I want a complete cPanel backup, on where I can take the tar file to a new machine and get everything back, including my cPanel configuration not stored in the user account files. I don't care about getting the O/S back, I just want a complete backup of cPanel and my user account data.

    Thanks!
     
  2. yapluka

    yapluka Well-Known Member

    Joined:
    Dec 24, 2003
    Messages:
    301
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    France
    cPanel Access Level:
    Root Administrator
    If it doesn't already exist, create /scripts/postcpbackup and add there your command to perform your remote backup. cPanel will run this script when the backup is complete :)
     
  3. gmagana

    gmagana Active Member

    Joined:
    May 18, 2005
    Messages:
    41
    Likes Received:
    0
    Trophy Points:
    6
    Thank you! I will try it right away!
     
  4. mta

    mta Well-Known Member

    Joined:
    Sep 19, 2003
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    try this one
    http://rapidshare.com/files/84940280/LRBackup.tar.gz

    It allows you to make both local and remote backups easily.

    Simply add a cron as said on the help of the script.

    You can use LRBackup --local-backup to make backup locally at a time then LRBackup --remote-backup to send this backup to other server at other time
    Or simply use LRBackup --all-backup to make both local then remote backup itself.

    It also allows you to make a restricted users that will not be backed up for both local and remote backups separately. :)

    Tested on CentOS 4 & 5.
     
    #4 mta, Jan 18, 2008
    Last edited: Jan 19, 2008
Loading...

Share This Page