Welcome! » Log In » Create A New Profile

Can one run do the whole rotation?

Posted by Anonymous 
Can one run do the whole rotation?
July 09, 2015 05:13AM
Hi
Do we need to have a cron running for each level (daily, weekly, monthly)?
Or could the daily do the weekly and monthly rotation itself?

I ask because now we have 3 crons (daily, weekly, monthly) each calling
the same script. Which means that on the weekly run, the data is
transferred again from the source. But the data could just be taken off
the daily.0 at this point... it's the same thing.

Thanks
Thierry

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
Can one run do the whole rotation?
July 09, 2015 06:08AM
Hallo, Thierry,

Du meintest am 09.07.15:

[quote]Do we need to have a cron running for each level (daily, weekly,
monthly)? Or could the daily do the weekly and monthly rotation
itself?
[/quote]
[quote]I ask because now we have 3 crons (daily, weekly, monthly) each
calling the same script. Which means that on the weekly run, the data
is transferred again from the source. But the data could just be
taken off the daily.0 at this point... it's the same thing.
[/quote]
???
The "weekly" and the "monthly" jobs only rename the existent backups and
then delete the oldest (and not more needed) backup of this level.

Renaming goes very quick. Deleting may need more time, but it transfers
nearly nothing.

Just take a look into the log file - it explains what the job does.

Please excuse my gerlish!

Viele Gruesse!
Helmut

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
Can one run do the whole rotation?
July 09, 2015 09:43AM
Hey Helmut,

Oh! So you mean that when we run #1 (daily) the content is transferred from source, but when #2 (weekly) is ran, the script gets the weekly content from daily.0?

#1 = /usr/bin/rsnapshot -c /root/scripts/backup/rsnapshot.server_cpbackup.conf daily
#2 = /usr/bin/rsnapshot -c /root/scripts/backup/rsnapshot.server_cpbackup.conf weekly

This would mean that you necessarily need to have a daily for the rest of the iteration to work?
Thanks!
--
Thierry
Can one run do the whole rotation?
July 09, 2015 09:59AM
Hallo, Thierry,

Du meintest am 09.07.15:

[quote]Oh! So you mean that when we run #1 (daily) the content is
transferred from source, but when #2 (weekly) is ran, the script gets
the weekly content from daily.0?
[/quote]
Perhaps.
If you have defined

interval daily 7

(what means the max. value for the daily backup), then the weekly job
first renumbers the existent weekly backups (1 number higher) and then
renames daily.6 to weekly.0

[...]

[quote]This would mean that you necessarily need to have a daily for the
rest of the iteration to work?
[/quote]
Yes! Again: take a look into the log file.

Viele Gruesse!
Helmut

------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
rsnapshot-discuss mailing list
rsnapshot-discuss < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rsnapshot-discuss
Can one run do the whole rotation?
July 09, 2015 10:01AM
On Thu, Jul 9, 2015 at 9:41 AM, Thierry Lavallee <thierry < at > 8p-design.com ([email]thierry < at > 8p-design.com[/email])> wrote:
[quote] Oh! So you mean that when we run #1 (daily) the content is transferred from source, but when #2 (weekly) is ran, the script gets the weekly content from daily.0?

#1 = /usr/bin/rsnapshot -c /root/scripts/backup/rsnapshot.server_cpbackup.conf daily
#2 = /usr/bin/rsnapshot -c /root/scripts/backup/rsnapshot.server_cpbackup.conf weekly

This would mean that you necessarily need to have a daily for the rest of the iteration to work?

[/quote]

Yes.  rsnapshot has no idea at all what daily, weekly, or the other terms mean, they&#39;re just strings.  You can call them alpha, beta, gamma, doesn&#39;t matter, it&#39;s the timing of the cron job which controls the interval stride.  When the cron job run, rsnapshot rotates the interval called up by one, then steals the oldest of the previous interval.  You can setup a trivial rsnapshot.conf and run things manually a few times to experiment.

Here&#39;s a snippet of my fully-primed snapshot root to see what I mean:

scott < at > nbackup:~$ ls -lt /.snapshots
total 292
drwxr-xr-x 8 root root  4096 Jul  7 06:00 hourly.0
drwxr-xr-x 8 root root  4096 Jul  7 00:00 hourly.1
drwxr-xr-x 8 root root  4096 Jul  6 18:00 hourly.2
drwxr-xr-x 8 root root  4096 Jul  6 12:00 hourly.3
drwxr-xr-x 8 root root  4096 Jul  6 06:00 daily.0
drwxr-xr-x 8 root root  4096 Jul  5 06:00 daily.1
drwxr-xr-x 8 root root  4096 Jul  4 06:00 daily.2
drwxr-xr-x 8 root root  4096 Jul  3 06:00 daily.3
drwxr-xr-x 8 root root  4096 Jul  2 06:00 daily.4
drwxr-xr-x 8 root root  4096 Jul  1 06:01 daily.5
drwxr-xr-x 8 root root  4096 Jun 30 06:01 daily.6
drwxr-xr-x 8 root root  4096 Jun 27 00:01 weekly.0
drwxr-xr-x 8 root root  4096 Jun 20 06:01 weekly.1
drwxr-xr-x 8 root root  4096 Jun 13 06:01 weekly.2
drwxr-xr-x 8 root root  4096 Jun  6 06:00 weekly.3
drwxr-xr-x 8 root root  4096 May 30 06:01 weekly.4
drwxr-xr-x 8 root root  4096 May 23 06:01 monthly.0
drwxr-xr-x 8 root root  4096 Apr 25 06:08 monthly.1
drwxr-xr-x 7 root root  4096 Mar 21 06:21 monthly.2

drwxr-xr-x 7 root root  4096 Feb 14 06:20 quarterly.0
drwxr-xr-x 7 root root  4096 Nov 22  2014 quarterly.1
drwxr-xr-x 7 root root  4096 Aug 22  2014 quarterly.2
drwxr-xr-x 7 root root  4096 May 23  2014 quarterly.3
...

Sometime tonight hourly.0 will be hourly.3 and will get renamed to daily.0.  Sometime Saturday night what is currently daily.2 will be daily.6, and will be shifted to weekly.0.  And so on.

-scott
Sorry, only registered users may post in this forum.

Click here to login