|
From: David C. <da...@ca...> - 2006-01-23 20:41:40
|
On Mon, Jan 23, 2006 at 08:05:38PM +0100, Julien Stern wrote: > As a matter of fact, a "monthly" (or cycle3) is typically _ALSO_ > going to be a weekly, daily and hourly. Remember, the fact that your config file says "monthly" doesn't mean a thing to rsnapshot. Whichever comes first in the config file is the only one that actually does any rsyncing, everything else just rotates. And the frequency with which the jobs happen is controlled not by rsnapshot but by cron. So if you think of hourly, daily, weekly and monthly really being called sync, 1st_level_rotate, 2nd_level_rotate etc, it becomes clearer what's going on. > ... Says that I start the monthly a 00:00. > The "rm" takes about 20 minutes (and maintains the lock). > So I cannot start the weekly before about 00:25. Indeed. This is why my crontab looks like this ... 00 00 * * * /usr/local/bin/rsnapshot daily 00 22 * * 6 /usr/local/bin/rsnapshot weekly 00 20 1 * * /usr/local/bin/rsnapshot monthly So my second level rotates happen at 20:00, first level rotates at 22:00 and syncs at 24:00. > * If the monthly was run, the weekly will be instantaneous, > because it will not need the "rm". > * If the monthly was NOT run, the weekly will take about 20 minutes > for the "rm" (and maintain the lock). Introducing an option to just move the oldest snapshot aside, then shuffle stuff around, then release the lock, and then delete the one we moved aside is on the to-do list. This will get rid of the problem of the lock being held for ages, but remember that the disk will still be being thrashed by rm after the lock is released, thus possibly slowing other jobs down. -- David Cantrell | A machine for turning tea into grumpiness There's a hole in the world like a great black pit And the vermin of the world inhabit it And its morals aren't worth what a pig could spit And it goes by the name of London. |