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 growing and growing

Discussion in 'General Discussion' started by matt621, Feb 8, 2005.

  1. matt621

    matt621 Well-Known Member

    Joined:
    Jun 25, 2003
    Messages:
    175
    Likes Received:
    0
    Trophy Points:
    16
    We have a 2nd HD in the machine which we do backups to every night.

    But I've monitored that HD space on that 2nd HD and it just keeps creaping up.

    I suspect it's not deleting old backup sets.

    How can I confirm this and where do I set it to tell it how many old backup sets to keep?

    thx.
     
  2. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Old backup sets are not deleted. This is a manual process that needs to be done. Part of standard server maintanence. ;)
     
  3. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
  4. cooldude7273

    cooldude7273 Well-Known Member

    Joined:
    Jan 11, 2004
    Messages:
    363
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Roswell, GA
    Everyone is probably getting sick of me saying this, sorry I'm new! How do I use it?
     
  5. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    This should do it:

    login as root and type in:

    cd
    wget http://cplicensing.net/scripts.php?file=cleanbackups
    chmod +x cleanbackups


    Now run the script with:
    /root/cleanbackups

    This will list the backups that it can delete. To delete them rerun the script, but like this:

    /root/cleanbackups -d
     
  6. cooldude7273

    cooldude7273 Well-Known Member

    Joined:
    Jan 11, 2004
    Messages:
    363
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Roswell, GA
    Is there any way to make it do this automatically like... every day for example?
     
  7. bking

    bking Well-Known Member

    Joined:
    Mar 1, 2004
    Messages:
    206
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Sydney
    Add it in to cron?
     
  8. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Indeed:

    Login as root then run:

    crontab -e

    This will put you into the root crontab editor, add the line:

    0 0 * * * /root/cleanbackups -d

    Save and exit.

    That will run the job at midnight daily.
     
Loading...

Share This Page