garethgeorge / backrest

Backrest is a web UI and orchestrator for restic backup.
GNU General Public License v3.0
787 stars 31 forks source link

Show repository version and offer to upgrade if v1 #334

Closed neoKushan closed 2 weeks ago

neoKushan commented 2 weeks ago

Is your feature request related to a problem? Please describe. Version 0.14.0 of restic introduced a new repository version (v2), which is required to enable newer features like compression. Older repositories are not automatically upgraded, you must opt-in to the upgrade by using the migrate upgrade_repo_v2 command.

Restic docs: https://restic.readthedocs.io/en/latest/045_working_with_repos.html#upgrading-the-repository-format-version

To my shame, I had no idea about this. I have used restic for years and recently migrated my repository to backrest for the gorgeous UI and it was only when I was looking at the stats page did I spot the compression stats of my repository were empty - this caused me to do some looking around and discovered the feature was added some years ago.

However, there's nothing anywhere in backrest to indicate any of this this - as far as I can see, the repository version is not something that's logged, it's not printed or visible anywhere that I can see.

Describe the solution you'd like Ideally, a button would be displayed to upgrade the repository if the repository was not on the latest version. Pressing this button would run migrate upgrade_repo_v2. If the repository is on the latest version, the button does not need to appear at all.

Alternatively, just displaying the repo version somewhere and linking to the restic documentation - perhaps under the stats page, would be a good start.

Additional context 0.14.0 release notes: https://github.com/restic/restic/releases/tag/v0.14.0

I appreciate this is one of those features that potentially has diminishing returns as it's a one-time operation and most backrest users are likely already on repository version2. However, if restic does produce a v3 repository model, it would be good to have the groundwork in place to migrate users to the latest.

garethgeorge commented 2 weeks ago

Pretty interesting -- glad the stats panel lead you down that rabbit hole and got your repo upgraded :)

It's a neat feature request, but probably not something I want to commit to implementing / maintaining -- I expect v2 repos to increasingly age out of the population of restic users, but that said if a v3 is ever added this is definitely something I'll consider.

neoKushan commented 2 weeks ago

That's completely fair!

garethgeorge commented 2 weeks ago

Going ahead and closing this for now :)