Feature-Request: Start backup only if some host is available

Hi there,

it would be great, if there is a feature, so that a backup is only started, if a specified host is available.

Background: I am using duplicati on my laptop. But sometimes I have no or a limited internet connection. So the backup should wait until my backup server is available.

Thanks in advance
Thomas

Welcome to the forum!

You can do this with –run-script-before and a custom errorlevel for the batch file. Errorlevel 1 is probably what you want unless you want a warning/error to be triggered:

Errorlevel 0: Everything is OK, start backup task
Errorlevel 1: Everything is OK, but don't run the backup
Errorlevel 2: There is something wrong, raise ParsedResult to Warning, add script output to Warning section in Result file. Run the backup.
Errorlevel 3: There is something wrong, raise ParsedResult to Warning, add script output to Warning section in Result file. Don't run the backup.
Errorlevel 4: There is something wrong, raise ParsedResult to Failed, add script output to Error section in Result file. Run the backup.
Errorlevel 5: There is something wrong, raise ParsedResult to Failed, add script output to Error section in Result file. Don't run the backup.

Is this on Windows? Here’s an example of what to put in your batch file:

ping -n 2 hostname || exit 1