Output from run scripts

Welcome to the forum!

I made a post recently discussing how Duplicati handles stdout and stderr from the pre and post scripts. Basically stderr is included in the Duplicati logs, as you note above. But stdout is either ignored completely (in the post- script) or it is parsed in order to adjust backup job behavior (in the pre- script).

For debugging your script, probably the easiest thing to do is place this at the end of any line that may cause an error. It will redirect both stdout and stderr to a file:

1>> C:\Temp\debug.log 2>&1

So your pre/post script might end up looking like this:

@echo off

some-command  1>> C:\Temp\debug.log 2>&1
another-command  1>> C:\Temp\debug.log 2>&1

This way you can at least capture the output to help you figure out what’s going on.