Open arberg opened 1 week ago
Also if you happen to know why I get this line, i would appreciate it. I guess its something with my setup. restic.exe is in the current dir, its not on the path, so it should be executed as ./restic.exe.
Possibly its a bug i resticprofile
if it use different restic
invocation for checking version than for actually executing the task.
2024/10/05 22:20:56 assuming restic is at latest known version ; exec: "restic.exe": cannot run executable found relative to current directory
Please, pretty please, forward restic exit code from resticprofile.
I would like to be able to do automation based on exit code from restic. If restic is never called, of cause do as you decide. But if restic is invoked I can do error-handling based on the actual code, possibly choosing between different retry strategies.
restic returning different error codes is a new feature actually, resticprofile hasn't caught up yet. I was planning on returning restic codes 👍🏻
About your example using locks, resticprofile can already try to unlock the repository automatically for you, documentation here: https://creativeprojects.github.io/resticprofile/usage/locks/index.html
2024/10/05 22:20:56 assuming restic is at latest known version ; exec: "restic.exe": cannot run executable found relative to current directory
I haven't seen this error before, although I'm no longer using a Windows machine. Does the restic.exe
have some weird permissions?
You can try to specify the location of the restic.exe
in the global section if that helps
In a PowerShell console, at least, Windows does not execute from the current working directory unless explicitly told to do so with .\some-command.exe.
Windows Terminal defaults to PowerShell unless you have overridden that, and on Windows 11 the right-click on the Start Menu popup defaults to using Windows Terminal.
This may be your issue.
Thank you both.
Cool to hear its a new restic feature, no wonder you were not forwarding the exit code yet.
Fred, regarding locks thank you, I know about it and appreciate that feature greatly. But thank you for the heads up. In this case the other program was running and I was considering adding some error-code handling to my scripts.
Btw. I've created powershell wrappers around restic-profile. The powershell scripts are crossplatform so can be used for both windows and linux, and I use it for both, though mostly I think its useful for the task-handling of the windows backups. Hopefully I'll publish it soon.
Thank you Daniel, it helped setting the path env, or setting the mentioned restic-binary to full path, that made the warning go away. Indeed in my case, restic was not on the path and I'm using powershell and therefore one had to run ./restic. But it worked for backup, as in resticprofile could find restic and launch the backup, so I was confused about the waning/error.
You can close this, if you don't think there's anything else to add or consider about the warning.
Please, pretty please, forward restic exit code from resticprofile.
I would like to be able to do automation based on exit code from restic. If restic is never called, of cause do as you decide. But if restic is invoked I can do error-handling based on the actual code, possibly choosing between different retry strategies.
Tested on 0.28.1.