Issue with restore

hello all, I’m facing a strange issue with restoring. The backup was setup with a post-backup batch script to shutdown the computer. Now everytime I try to recover a file, the pc initiate the shutdown even before showing the files to be restored. What can I do to be able to recover the files I need but kepping the shutdown after backup?
Tya
Stefano

The post-backup script of a backup job is invoked each time any operation is done, not only with a backup operation.

When starting a Restore operation, a few LIST commands are executed in the background to find available versions. These LIST commands are followed by your script that shutdown the computer at the moment that the file picker shows up.

Quick fix:
Temporary comment out the SHUTDOWN command before doing a restore operation.

To fix it permanently:
The operation type is stored in an environment variable %DUPLICATI__OPERATIONNAME%. The value of this variable can be Backup, Cleanup, Restore, or DeleteAllButN.
Add this line to the beginning of your script:

if /i "%DUPLICATI__OPERATIONNAME%" NEQ "BACKUP" exit 0

This will stop further execution of the script if the operation is anything else than Backup.

More information can be found in these example scripts:


1 Like

TYVM for your answer, now it works…

Sorry for the necro but is there a way to add this for the docker container through the web gui?