Chris Miller
2015-06-24 14:27:21 UTC
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, t his lowest position is filled with a new backup. In the case of all other intervals, t his lowest position is filled with by promoting the OLDEST generation of the adjacent, lower interval.
I'd like to change this by promoting the NEWEST 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.
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, t his lowest position is filled with a new backup. In the case of all other intervals, t his lowest position is filled with by promoting the OLDEST generation of the adjacent, lower interval.
I'd like to change this by promoting the NEWEST 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.