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 script

Discussion in 'General Discussion' started by igorfelluga, May 13, 2008.

  1. igorfelluga

    igorfelluga Active Member

    Joined:
    May 31, 2006
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    Hi, I'm looking for a backup script that do an incremental backup of today,the day before, a weekly and monthly.
    Where I can find it?
    Thanks
     
  2. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
    You would be 90% there already by using the cpanel backup script set to incremental for daily, weekly and monthly. Then to get the day before, simply add a cronjob to sync your daily backup into another location before it gets overwritten by the daily cpbackup schedule.

    So before the backup runs, depending on how many files change, simply sync up the files to your "day before" directory like so:

    Say that your backup runs at midnight, set this to sync up at 11pm or a bit later as long as you have plenty of time to complete the task before midnight.


    0 23 * * * rsync -rlptD --delete /backup/cpbackup/daily/ /backup/previous-day
     
Loading...

Share This Page