The first column in the crontab listing is for minutes, they are in order as follows:
minute
hour
day of month
month
day of week
You can use the divide-by operator like */2 to indicate every minute (*) divided by 2, thus... every other minute.
* */2 * * * /foo/bar # would indicate every other hour.
* * */2 * * /foo/bar # would indicate every other day
etc
I'm not entirely sure what happens in roll-over conditions where the thing you're dividing (mins, hours, etc) results with a remainder. I'd suspect that since it's referred to as "steps" in the man page, that it would simply result in it always beginning on the first step - i.e. every top of the hour (or day, or whatever) the cycle would begin again, instead of continuing on with the remainder. But if anyone has tested that obscure facet, I'd love to know. :)
Aaron J.
Turnpike Man wrote:
Can the --exclude /path/to/exclude/ also be used in the rsync server/client as I have decided to use?
I went server/client b/c I didn't want to muck with setting up the RSA stuff required to do rsync via ssh without a password requirement.
thanks! David M.
PS, and in learning more about crontab, does that mean every 2 hours the way you wrote it? thanks!
--- "Aaron S. Joyner" <[EMAIL PROTECTED]> wrote:
A crontab entry something like this should do the trick:
*/2 * * * * /usr/local/bin/rsync -a --delete -e ssh --exclude 'files/*/to/exclude' /path/to/local/files/ <remotemachine>:/remote/path/to/store/
This will sync the directory on the local host with the remote host every 2 minutes. It will always consider the local host to be authoritative, and if something is deleted locally, it will delete it remotely on the next sync. If something is changed on the remote side, it will get blown away on the next sync.
Aaron J.
__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html
-- TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug TriLUG Organizational FAQ : http://trilug.org/faq/ TriLUG Member Services FAQ : http://members.trilug.org/services_faq/ TriLUG PGP Keyring : http://trilug.org/~chrish/trilug.asc
