-
Notifications
You must be signed in to change notification settings - Fork 75
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Preserve oldest snapshot when forget policies not satisfied #1032
Comments
@kapitainsky What do you expect as outcome here? I think restic does exactly the same here - there are 2 last, 2 daily, 2 weekly and 2 monthly snapshots kept... |
The latest |
That logic you have linked is already implemented in rustic (it was implemented in rustic before it was added to restic). And in this example it doesn't apply, as all |
And let's be pragmatic and logical - I want to keep last 2 monthly snapshots. In human terms it means I do not expect 1 month old snapshot to be removed (given it is the last one). This is where pure algorithm logic does not work in real life. IMO it is very practical to not touch the oldest snapshot - this is what Look at my example - I want to keep 2 months snaps - suddenly I have only last few days. And before running forget I had 1 month. |
@kapitainsky Did you read my last comment? I do think that rustic behaves exactly like restic here and that restic also would remove that last snapshot. Simply because it keeps 2 monthly snapshots, as requested: The one from 2024-02-01 and the one from 2024-01-31. Can you explain why you expect rustic to keep the snapshot from 2023-12-31 which would be the third monthly snapshot? |
Because between 2024-02-01 and 2024-01-31 there is 1 day difference? And you are dropping one from 2023-12-31? Which maybe satisfy some artificial logic of 2 months but defies any common sense. Let's say I started my Very simple adjustment to prevent it is (like |
If you want to keep monthly snapshots which are less then 2 month old, the
Please run |
I agree that this |
FWIW, the logic you are requesting and which has been added recently to restic has been added to rustic here: |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
I would like to suggest
restic
implemented logic to try to keep the oldest snapshotrestic/restic#4366
At the moment with
rustic
with for example forget policies:$ rustic forget
using config ./rustic.toml
[INFO] repository rclone:OD01-ENC:restic-test: password is correct.
[INFO] using cache at /Users/kptsky/Library/Caches/rustic/xxxx
snapshots for (host [kp-laptop.local], label [], paths [/])
on the 1st of Feb 2024 the last snapshot from 31st of Dec is removed - it is only 31 days old....
I think it is something from
restic
that can be copied intorustic
- much more logical IMO.The text was updated successfully, but these errors were encountered: