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_firstenabled is designed for you to run onesynccommand then one or more of the interval commands as is time appropriate. Runningsyncbefore every cron job defeats the use ofsync_first. You should runsyncjust before your smallest interval.As far as organizing your cronjob, the only ordering that is critical is between the
syncandhourly.dailywill just use the oldesthourlyavailable for its newestdaily.0,weeklythe oldestdailyetc.hourlythough, expects a.syncdirectory from which to create its newhourly.0. Ifdailyruns beforehourlyit 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 syncfollowed byrsnapshot hourlyand 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
rsynccommand by hand before a previous one completes.