A few year ago, I setup Duplicati to Backup on PC startup (Windows) by letting the Windows Scheduler launch a .bat file.
Today I learned that for half a year, the backup process failed. When launching the .bat from command line, I do get an error message, but since it was launched in the background (or however the Windows Scheduler starts files), I never realized.
Since the moment you realize that it went wrong is for usual when you need to restore a file, I think it’s vital that the error message is somehow elevated, e.g. to a Windows Notification.
It might be that Duplicati does this already, so following are the .bat I used and the stack trace.
The .bat was, iirc, created using the GUI. Its contents are:
chcp 65001
“…\Duplicati.CommandLine.exe” backup "onedrivev2://… " “C:\#Files.…” "C:\#Files.… " “–backup-name=Main_B” "–dbpath=C:\Users.… " --encryption-module=aes --compression-module=zip --dblock-size=50mb “—passphrase=…” --exclude-files-attributes=“hidden,system,temporary” --disable-module=console-password-input “–exclude=.git\" "–exclude=.tmp” “–exclude=.xml~" "–exclude=\desktop.ini” “–exclude=.partial" "–exclude=.part” “–exclude=*.trashes”
For completeness, here is top of the error message (Apparently the Token for Onedrive had expired):
Fatal error => Autorisation mit dem OAuth Service ist fehlgeschlagen: Server error. Wenn das Problem weiter besteht, versuche ein neues AuthID Token zu generieren von: Duplicati OAuth Handler
ErrorID: OAuthLoginError
Autorisation mit dem OAuth Service ist fehlgeschlagen: Server error. Wenn das Problem weiter besteht, versuche ein neues AuthID Token zu generieren von: Duplicati OAuth Handler
Unbehandelte Ausnahme: System.AggregateException: Mindestens ein Fehler ist aufgetreten. —> System.IO.IOException: Die Pipe wurde beendet.