I’m using ZFS to make snapshots of the destination after a backup completes. Unfortunately, I’m getting errors when I use --run-script-after. (More specifically, I’m using the GUI interface and added it as an extra option in step 5.) When I try to run a command directly, I get this:
2021-09-05 14:17:42 -06 - [Warning-Duplicati.Library.Main.Controller-OptionValidationError]:
The value "/usr/sbin/zfs snapshot tank/duplicati/brad-computer@`date +"%b-%d-%y_%H:%M:%S"`"
supplied to --run-script-after does not represent a valid path
When I changed to execute that in a script instead, I get:
Warning while running Brad Computer -> Dest Storage
2021-09-05 14:25:11 -06 - [Warning-Duplicati.Library.Modules.Builtin.RunScript-ScriptExecuteError]:
Error while executing script "/external/scripts/bradbackup_brad-computer.sh":
The system cannot find the file specified
For both, I verified each command works by copying the command from the error message, pasting it in an ssh terminal command prompt, pasting it, and verifying it functions correctly.
I’m at a loss what to try next. Is there anything special I need to do to make --run-script-after work?
I think --run-script-after executes a script from the client side. I spent all day configuring zfs on the server, and I’ve already given Duplicati an ssh username and password to do its work. So my brain never thought twice when it just assumed the script runs server side.
Edit: Yes, drwts32 was on it at the same time I was writing mine.
Now I need to figure out a way to execute a server side script on Duplicati job completion…
Hah, glad you figured it out. Yes Duplicati runs everything locally. Shouldn’t be too hard to have a local script run remote commands though, especially if both sides are Linux.