cron questions
Josh Richards <[email protected]>
| Newsgroups | gmane.comp.sysutils.backup.hdup.general |
|---|---|
| Message-ID | <[email protected]> |
In Nathan G. Grennan's original post with his cron configuration: http://article.gmane.org/gmane.comp.sysutils.backup.hdup.general/39 he skips running the weekly and daily on the first of the month and, similarly, skips running the dailys on the days that the weeklys run; # Monthly backup 0 0 1 * * root /usr/local/sbin/bmonth news # Weekly backup 0 0 7,14,21,28 * 0 root /usr/local/sbin/bweek news # Daily backup 0 0 2,3,4,5,6,8,9,10,11,12,13,15,16,17,18,19,20,22,23,24,25,26,27,29,30,31 * * root /usr/local/sbin/bday news in the examples/ directory of the hdup tarball the hdup.cron has all of these days that were previously excluded, well, included: # --- start of new backup season --- # 00 02 1 * * root /usr/local/sbin/hdup -q -q monthly host # --- the weekly --- # 00 04 1,7,14,21,28 * * root /usr/local/sbin/hdup -q -q weekly host # --- the daily --- # 00 06 1-31 * * root /usr/local/sbin/hdup -q -q daily host Now, technically, I could see either as being perfectly valid but... I see some problems with the latter (the one included in examples/hdup.cron). For example, if the timing of the monthly, weekly, and dailys is set just right so that each finishes before the other then you're probably alright. But if not, won't what is backed up be somewhat non-deterministic and, worse, possible wrong? For example, say it is the 7th and the daily starts while the weekly is still going -- what will be backed up? Or, worst case, it is the 1st of the month... the monthly starts...before it completes the weekly starts...and before it completes the daily starts. I suppose I could have one script that I run, starting each right after the other -- thus guaranteeing each can't start until the prior one completes. Or I could do it the way that it was suggested by Nathan in the first post (which I presume the example cron script is based on). The main difference, I think, would be differing version history. Thinking about it I suppose I do want to run all of these from one script to (a) make the order deterministic (b) better tweak the ordering for version control if I, say, wanted the daily on the 7th to be done before the new weekly gets done. Thoughts? What are others doing? -jr -- Josh Richards | Collocation Web Hosting Bandwidth Digital West Networks | +1 805 781-9378 / www.digitalwest.net San Luis Obispo, CA | AS14589 & AS29962 [email protected] | DWNI - Making Internet Business Better