Welcome! » Log In » Create A New Profile

Promotion of lower intervals

Posted by Anonymous 
Promotion of lower intervals
June 24, 2015 07:29AM
Hi Folks,

rsnapshot runs with an argument that tells it which interval to handle. The current interval, whichever interval it is, first sees a sequential promotion of all the generations, leaving an open slot at the lowest position. In the case of the lowest interval, this lowest position is filled with a new backup. In the case of all other intervals, this lowest position is filled with by promoting the [b]OLDEST[/b] generation of the adjacent, lower interval.

I'd like to change this by promoting the [b]NEWEST[/b] generation of the adjacent, lower interval. The biggest reason for this is that the promoted generation is not on the boundary of the new interval. Suppose I have the normal "day", "week", "month", "year" intervals, and suppose I have, say, 10 daily backups. When I promote one of them to "week" on Sunday, I will not be getting a Sunday backup, it will be a Wednesday backup. This is the same problem for "month" not being a first or last day of the month, but even worse because the existing "day" offset compounds. By the time I get to "year" I will be off by quite a bit.

I don't know perl well enough to read it very well, but this looks to be really good time to learn. Can somebody point me to the area in the code that handles this promotion? I can probably figure it out from there. This should become a configurable behavior.

Thanks for the help,

Chris.
Promotion of lower intervals
June 24, 2015 08:05AM
On 24 June 2015 at 15:27, Chris Miller <cjm < at > tryx.org ([email]cjm < at > tryx.org[/email])> wrote:
[quote]I&#39;d like to change this by promoting the [b]NEWEST[/b] generation of the adjacent, lower interval. The biggest reason for this is that the promoted generation is not on the boundary of the new interval. Suppose I have the normal "day", "week", "month", "year" intervals, and suppose I have, say, 10 daily backups. When I promote one of them to "week" on Sunday, I will not be getting a Sunday backup, it will be a Wednesday backup. This is the same problem for "month" not being a first or last day of the month, but even worse because the existing "day" offset compounds. By the time I get to "year" I will be off by quite a bit.

[/quote]

The new release of Rsnapshot will use alpha, beta and gamma rather than day, week month, so some of the potential confusion is eliminated. That said, I think many people would actually like to keep monthly and have it mean monthly, and not just weekly*4, which as you say gets out of sync really quickly.

poc
Promotion of lower intervals
June 24, 2015 08:53AM
On Wed, Jun 24, 2015 at 04:03:41PM +0100, Patrick O'Callaghan wrote:

[quote]The new release of Rsnapshot will use alpha, beta and gamma rather than
day, week month, so some of the potential confusion is eliminated. That
said, I think many people would actually like to keep monthly and have it
mean monthly, and not just weekly*4, which as you say gets out of sync
really quickly.
[/quote]
You've always been able to call them whatever you like. The
documentation is changing to alpha/beta/gamma because we found that
having daily/weekly/monthly/etc in the doco confused people and made
them think that rsnapshot knew about those by default and would run in
the background taking backups periodically.

--
David Cantrell | Bourgeois reactionary pig

Suffer the little children to come unto me, as
their buying habits are most easily influenced.
-- Marketroid Jesus

------------------------------------------------------------------------------
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
Promotion of lower intervals
June 24, 2015 09:15AM
On Wed, Jun 24, 2015 at 8:52 AM, David Cantrell <david < at > cantrell.org.uk ([email]david < at > cantrell.org.uk[/email])> wrote:
[quote]On Wed, Jun 24, 2015 at 04:03:41PM +0100, Patrick O&#39;Callaghan wrote:
[quote]The new release of Rsnapshot will use alpha, beta and gamma rather than
day, week month, so some of the potential confusion is eliminated. That
said, I think many people would actually like to keep monthly and have it
mean monthly, and not just weekly*4, which as you say gets out of sync
really quickly.
[/quote]
You&#39;ve always been able to call them whatever you like. The
documentation is changing to alpha/beta/gamma because we found that
having daily/weekly/monthly/etc in the doco confused people and made
them think that rsnapshot knew about those by default and would run in
the background taking backups periodically.
[/quote]

It is certainly the case that before patching up rsnapshot to take snapshots for very specific points in time, it would be worthwhile to verify that you have an actual business need for that.

Also, note that there is no set of moving-snapshots-between-intervals which can simultaneously preserve snapshots for Sunday, the first day of the month, and the first day of the year.  You&#39;ll need additional logic to make copies.  At which point you might as well either have separate rsnapshot configs for the intervals you really want.  Perhaps you could have one config setup to sync first, then other configs to copy their intervals from that copy.

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

Click here to login