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!

Backups script

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

  1. igorfelluga

    igorfelluga Active Member

    May 31, 2006
    Likes Received:
    Trophy Points:
    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?
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. jayh38

    jayh38 Well-Known Member

    Mar 3, 2006
    Likes Received:
    Trophy Points:
    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

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