We use restic on a set of Windows servers, running daily automatic updates using self-update.
Since the release of 0.15, the previous version (on all servers) stopped working.
We do restic self-update --output restic-next.exe and it suddenly fails everywhere with:
writing restic to C:\Path\To\Restic\restic-next.exe
find latest release of restic at GitHub
latest version is 0.15.0
download SHA256SUMS
download SHA256SUMS.asc
GPG signature verification succeeded
download restic_0.15.0_windows_amd64.zip
downloaded restic_0.15.0_windows_amd64.zip
Fatal: unable to update restic: unable to rename target file: rename C:\Path\To\Restic\restic-next.exe C:\Path\To\Restic\restic-next.exe.bak: The system cannot find the file specified.
I can constanly reproduce it even locally on my Windows 10 machine:
Create an empty folder and fetch 14.0: curl -Ls --output restic.zip https://github.com/restic/restic/releases/download/v0.14.0/restic_0.14.0_windows_amd64.zip
Extract to restic.exe
Then run restic self-update --output restic-next.exe
Note: it working using 12.1. So do the same as above, but download 12.1 instead, and everything works. So combo 14.0 upgrading to 15.0 seem to be the problem.
The suggested workaround worked when I tested it. We can adopt that I think.
I comes with a side-effect that it leaves a restic-next.exe.bak behind (a copy of the dummy file), but it’s not a real problem.