I have read a few threads on here regarding ‘run-script-after’ – but I’m having some trouble getting this to work the way I want. I am using Duplicati GUI.
After a successful backup, I want Duplicati to run a .cmd script to sync the destination with rclone. This works great:
But, how to get that to pop up in a cmd.exe window so I can view the progress of the sync as it’s running? If I do the below, it pops up the cmd window and runs the rclone sync as soon as the Duplicati backup is started. So it syncs before the backup is even done.
You can do this without all the start stuff. Do you really prefer to watch it?
I use a run-script-after to check my backup, using rclone the other way like
set STEP=rclone sync to local
C:\bin\rclone sync "%REMOTE%" "%LOCAL%\sync" --backup-dir="%LOCAL%\backup" --verbose=1 2> "%LOCAL%\rclone.log"
if %ERRORLEVEL% NEQ 0 goto error
Exit Code is probably what I relied on. I don’t think I researched their forum
because it wasn’t that important to me, but your situation might be different.
One drawback of extensive work in a normal run-script-after is it delays the
ability of Duplicati to run other things (including another backup) for awhile,
however one can signal any error back to Duplicati for final late processing:
The 4 will alert Duplicati which can then alert you via any of many methods.
EDIT:
On the other hand, if the intent is to write fast to a drive, then upload slowly,
consider any risks or confusions of next backup starting during prior upload.