Welcome! » Log In » Create A New Profile

sync_first - Workflow

Posted by Anonymous 
sync_first - Workflow
June 26, 2015 02:58AM
Hi list.
 
I am not sure if I got the workflow right when using sync_first, so I need to make sure...
 
My strategy is having 2 hourly backups (one at noon another at 4 pm).
I do daily backups at 3am, weekly at 2am, monthly at 1am.
 
In my crontab I defined something like this:
00 12 * * * rsnapshot sync && rsnapshot hourly
00 16 * * * rsnapshot hourly
00 01 * * * rsnapshot daily
 
Will sync be done when using sync_first 1 before the second hourly, daily and so on are called or does it has to be called explicitly like in the first hourly statement?
 
-fuz
sync_first - Workflow
June 26, 2015 04:21AM
On Fri, Jun 26, 2015 at 11:37:11AM +0200, Stefan Lamby wrote:
[quote]Hi list.

I am not sure if I got the workflow right when using sync_first, so I
need to make sure...

My strategy is having 2 hourly backups (one at noon another at 4 pm).

I do daily backups at 3am, weekly at 2am, monthly at 1am.

In my crontab I defined something like this:

00 12 * * * rsnapshot sync && rsnapshot hourly
[/quote]
This will only do the "hourly" rotate if rsnapshot sync has exit status
0 (All operations completed successfully). You probably want to also
do the hourly rotate if rsync sync has exit status 2 (Some warnings
occurred, but the backup still finished).

[quote]00 16 * * * rsnapshot hourly

00 01 * * * rsnapshot daily

Will sync be done when using sync_first 1 before the second hourly,
daily and so on are called
[/quote]
No.

[quote]or does it has to be called explicitly like
in the first hourly statement?
[/quote]
Yes.

Instead of 2 lines with rsnapshot hourly, I'd use
00 12,16 * * * rsnapshot sync && rsnapshot hourly
or
00 12,16 * * * rsnapshot sync ; [ $? = 0 -o $? = 2 ] && rsnapshot hourly

--
___________________________________________________________________________
David Keegel <djk < at > cyber.com.au> Cyber IT Solutions Pty. Ltd.
http://www.cyber.com.au/~djk/ Linux & Unix Systems Administration

------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
sync_first - Workflow
June 26, 2015 05:37AM
Thanks, David

[quote][quote]or does it has to be called explicitly like
in the first hourly statement?
[/quote]
Yes.
[/quote]So, would it be better to do a last hourly when working hours are over using:
00 12,16,21 * * * rsnapshot sync ; [ $? = 0 -o $? = 2 ] && rsnapshot hourly
 
and after that doing a
00 03 * * * rsnapshot daily
 
without calling rsnapshot sync before? Or would it be better run the sync before doing the rotation always?

Thank you.

 
sync_first - Workflow
June 28, 2015 02:57AM
Thanks, David

[quote][quote]or does it has to be called explicitly like
in the first hourly statement?
[/quote]
Yes.
[/quote]So, would it be better to do a last hourly when working hours are over using:
00 12,16,21 * * * rsnapshot sync ; [ $? = 0 -o $? = 2 ] && rsnapshot hourly
 
and after that doing a
00 03 * * * rsnapshot daily
 
without calling rsnapshot sync before? Or would it be better run the sync before doing the rotation always?

Thank you.
Sorry, only registered users may post in this forum.

Click here to login