My .conf file:
link_desk 1
sync_first 1
I'm using cron to do interval backups.
0 * * * * rsnapshot sync
10 * * * * rsnapshot hourly
30 3 * * * rsnapshot daily
0 3 * * 1 rsnapshot weekly
30 2 1 * * rsnapshot monthly
It's confusing me and i do not know if its right. Maybe I should do sync before every cronjob or just before smallest interval?
In the future i want run another backup with rsnapshot with seperate config file (for windwos machine).For example:
0 * * * * rsnapshot -c windows.conf sync
10 * * * * rsnapshot -c windows.conf hourly
30 3 * * * rsnapshot -c windows.conf daily
0 3 * * 1 rsnapshot -c windows.conf weekly
30 2 1 * * rsnapshot -c windows.conf monthly
.pid files I can separate in config file. Would I still have incompatibility issues with parallel running two rsnapshot process?
And the last question how could I organize cronjobs? what if my sync process takes longer than coming backup command? Is it possible to run rsnapshot hourly just after rsnapshot sync?
rsnapshot ran with
sync_first
enabled is designed for you to run onesync
command then one or more of the interval commands as is time appropriate. Runningsync
before every cron job defeats the use ofsync_first
. You should runsync
just before your smallest interval.As far as organizing your cronjob, the only ordering that is critical is between the
sync
andhourly
.daily
will just use the oldesthourly
available for its newestdaily.0
,weekly
the oldestdaily
etc.hourly
though, expects a.sync
directory from which to create its newhourly.0
. Ifdaily
runs beforehourly
it will take the 1:00 AM rather than the 2:00 AM hourly backup which gives you nearly, but not exactly, the same backup coverage. You'll need to decide if that's critical for your situation.When faced with your question I created a small script file that ran
rsnapshot sync
followed byrsnapshot hourly
and scheduled that in cron.I have no experience running snapshots in parallel. As long as you are backing up to different directories I predict no issues beyond CPU and network usage. It will be like starting a second
rsync
command by hand before a previous one completes.