Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Specify time delta generation size #31

Open
psde opened this issue Nov 16, 2015 · 3 comments
Open

Feature request: Specify time delta generation size #31

psde opened this issue Nov 16, 2015 · 3 comments
Labels

Comments

@psde
Copy link
Contributor

psde commented Nov 16, 2015

I propose an addition to the current deltas syntax to specify the generations size:
deltas: 1h 7d;12h 14d;1d 90d;7d 360d

This would mean:

  • Hourly backups for the first 7 days
  • Two backups per day for the following 7 days
  • Daily backups untill day 90
  • Weekly backups for the rest of the year

I realize the syntax is leaving something to be desired.

Please tell me if I overlooked something and this is already possible with the current deltas syntax.

@miracle2k
Copy link
Owner

I'm up for this. I'd like the current syntax be be essentially a short form of the new extended one:

Right now: 1d 7d 30d
Has this meaning:

  • daily for first seven days
  • weekly until day 30

The equivalent in extended form code possibly then be: 1d:7d 7d:30d. If you don't need the extended one, you can skip the duplicate numbers.

I don't like my syntax suggestion either though; it looks like hex codes.

What bits me is that even with the current syntax, the first and last delta pairs already have the meaning that we want to introduce in the extended version. Meaning: 1h 1d and 1h:1d would be equivalent. I'm not sure what to make of this.

I could also imagine a completely new, verbose syntax:

ev 1d for 7d; ev 7d for 30d

@psde
Copy link
Contributor Author

psde commented Nov 27, 2015

I aggree with everything you are saying, but sadly I don't have a better idea for the syntax. A verbose syntax has the downside of more complex parsing, but is much better to read.

Meanwhile, if anyone is interested in my original syntax, I have a working version at https://github.com/psde/tarsnapper/tree/better-deltas which I am currently using.

@dregad
Copy link

dregad commented May 30, 2021

This feature would be really nice to have.

As for the syntax, I don't really care about the delimiter - ; and : or even - would all work for me. I don't see the need for the verbose option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants