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
is restic support use --keep-last and --keep-daily together #1562
Comments
@gongmingbin There's a dry run option to the
You can use it to run your command and see what would be done, without having it done. Run |
I've built an example for you, let's say I have an hourly backup for a directory for the last couple of days:
When you run restic with
I find it confusing to talk about "and" and "or" here. restic follows the policy you give it:
restic then goes through all the snapshots available and marks which ones will be kept. The snapshot So, in a sense you could say that the conditions for keeping a snapshot are combined via or. I think this answers your question, so I'm closing this issue. If you have follow-up questions (or I wasn't clear enough), please add a comment. For these types of questions the forum is a much better place, we're using the GitHub issue tracker for tracking bugs and features. |
Thank you! @fd0 But I found --keep--xx not working.
result is: |
You told restic to keep 1 snapshot per year for 10 years. Since you only have snapshots from 2018 and How many snapshots per period do want to keep? Maybe we can help you with the policy. |
@dimejo , sorry,Maybe I misunderstood. is the --keep-yearly 10 mean than restic will kept all then snapshots than is from last 10 ago to now? for my example, the three snapshots was in the last 10 years, way not all of them will be kept? |
@gongmingbin I think restic does exactly what you asked it to do. Did you find the section in the manual that covers removing snapshots according to a policy? https://restic.readthedocs.io/en/latest/060_forget.html#removing-snapshots-according-to-a-policy Running Is there anything unclear? |
Thank you very match!! I misunderstand for my bad English and reading doc carelessly! Thank you for your patient answers again! |
is restic support use --keep-last and --keep-daily together? and or or ? for example:
the kept snapshots are that satisfy last 10 and in 10 days ? or the kept snapshots are satisfy only one condition?
The text was updated successfully, but these errors were encountered: