backrest icon indicating copy to clipboard operation
backrest copied to clipboard

Auto-Updater for all platforms

Open ncavallini opened this issue 1 year ago • 4 comments

Is your feature request related to a problem? Please describe. Backrest releases come out pretty often. I've installed it on many computers and it's quite hard to keep track of which version is installed where.

Describe the solution you'd like It'd be nice to have an auto-updater component for the Windows version (letting the user choose if automatic installation can be done or just notify of the update).

Additional context Could implement it pretty easily just by periodically querying the GitHub API. The hard(er) part is to determine the currently installed version.

ncavallini avatar Nov 05 '24 10:11 ncavallini

Hi,

for Windows the most easy way would be to add Backrest to Winget, it acts similar to Linux package managers. In that case no additional software has to be programmed for auto updating, also Winget is preinstalled since Windows 10 and auto-updating is possible via task scheduler. That would not only make updating easier, but also the installation process:

Installation of Backrest via Winget winget install backrest

Update of Backrest via Winget: winget update backrest

@garethgeorge Microsoft describes the steps required to publish software to Winget, probably it's possible for you to check the guidelines? https://learn.microsoft.com/en-us/windows/package-manager/package/?WT.mc_id=modinfra-30991-salean Also thanks for your great software, it makes Restic finally usable for me!

Edit: rclone is also part of Winget and doesn't provide an updater software on it's own: grafik

brokoler avatar Nov 15 '24 11:11 brokoler

Great idea, didn't think of that. Btw, is it possible to mantain the config (now I'm running the version download from the Releases here on GitHub)?

Thank you

ncavallini avatar Nov 15 '24 11:11 ncavallini

Just wanted to share an alternative idea to winget. George, you already have the code to download restic from github. You can probably use the same code to update backrest.exe and backrest-windows-tray.exe from github (and not depend on Microsoft approving your app). From what I'm reading, in order for a running process to update itself on Windows, it needs to rename the old exe to a different name, then download the new version with the correct name.

My guess is that you want the self-update process to be portable across all operating systems. I assume this is what you currently have with restic binary.

homandr avatar Nov 18 '24 21:11 homandr

Likely implementation pathway is: https://github.com/minio/selfupdate

Rather than truly auto-updating this should probably be a prominent UI element (on the status dashboard) that a user can click to trigger the backend to update itself. In the future backrest can perhaps support opt-in true "auto updates"

A heuristic should disable this feature if backrest suspects it is being managed by a package manager e.g. homebrew on macOS or is running in docker.

garethgeorge avatar Feb 14 '25 09:02 garethgeorge