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

Save for all levels at first run. #306

Open
3 tasks done
xkszltl opened this issue Sep 3, 2022 · 2 comments
Open
3 tasks done

Save for all levels at first run. #306

xkszltl opened this issue Sep 3, 2022 · 2 comments
Labels

Comments

@xkszltl
Copy link

xkszltl commented Sep 3, 2022

Checklist

  • I'm asking for a feature to be changed or added
  • I've searched the bugtracker for similar issues, including closed ones.
  • I realise that rsnapshot is stable software and most feature requests will be rejected

My suggestion is ...

If alpha.0 exists but beta.0 does not, create beta.0 from alpha.0 immediately, instead of waiting for alpha.last_retain.

Why I want it

Currently rsnapshot saves in an "overflowing" manner, e.g. first daily backup won't exist until 24 hourly backup.
The problem with that design is, daily backup will never cover things in the first day, and similarly weekly backup never knows about the first week.
IMO the backup windows should be consistent across levels.

From another perspective, if we initially setup hourly+daily, and later on remove hourly, there're 2 issues with current design:

  • If it's done within the first day, it'll re-copy everything again because there's no daily.0 yet.
  • If external tool wants to search something on daily level, it won't be able to do that until the 2nd day.

Why should this be in rsnapshot and not implemented using some external tool?

This behavior is purely controlled by rsnapshot.

@xkszltl xkszltl added the feature label Sep 3, 2022
@DrHyde
Copy link
Member

DrHyde commented Sep 5, 2022

You could, if you have GNU cp, sudo cp -al alpha.0 beta.0 after the first backup finishes.

@xkszltl
Copy link
Author

xkszltl commented Sep 6, 2022

I'm relying on similar workaround currently, but that requires parsing /etc/rsnapshot.conf to get all levels, and also depends on how exactly rsnapshot is implemented, which is why it's supposed to be done in rsnapshot.

This also couples with the destructive rotation issue: if we want to rotate earlier before the level is filled up, could be intentional to avoid losing copy after intra-level rotation, or could be my computer wasn't up all day for 24 hourly backup before the daily one, we got a bubble. I believe both issues are originated from the same design choice. Instead of 'mv alpha.(retain - 1) beta.0', it should cp alpha.(ls alpha.* | sort -nr | head -n1) beta.0, and not rotate beta when there's no alpha.

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

2 participants