Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

WHM backup

Discussion in 'General Discussion' started by unixguy79, Sep 7, 2005.

  1. unixguy79

    unixguy79 Registered

    Joined:
    Sep 7, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    151
    A client of mine uses WHM for backing up web hosting accounts. He says that the backups do not accumulate (that is one overwrites the next). He wants the files to contain the date at least and maybe the time instead of just the account name so they don't overwrite the one from before.

    Is there any way to do this with the WHM backup mechanism and if not what alternatives do I have?

    Thanks.
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,470
    Likes Received:
    21
    Trophy Points:
    463
    Location:
    Go on, have a guess
    It's not directly possible. However, you could write a script that rotates the cPanel full backups to store a day of the week copy too.

    Here's a script that I have written for the purpose:

    Code:
    #!/usr/bin/perl
    #
    ###############################################################################
    # Written by Jonathan Michaelson (jonathan@waytotheweb.com)
    # http://www.webumake.com
    #
    # Please feel free to use or modify this script. It would be nice to leave the
    # above intact.
    ###############################################################################
    # cPanel backup rotation script
    # v1.1 1 Feb 2004
    #
    use File::Path;
    
    my $backupdir = "/backup/cpbackup";
    my @days = ("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
    
    # Tidy
    my $today = $days[(localtime())[6]];
    
    # Copy backup
    system ("/bin/rm -Rf $backupdir/$today");                    
    system ("/bin/cp -af $backupdir/daily $backupdir/$today");   
    exit;
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. HelloAdam

    HelloAdam Well-Known Member

    Joined:
    Nov 6, 2005
    Messages:
    145
    Likes Received:
    0
    Trophy Points:
    166
    Howdy,

    Does this script still work?


    Thanks,
    Adam
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice