I’m using duplicati on my laptop. I spend about 50% of my time in city A and 50% in city B. When I’m in my home location, I backup to my NAS, when I’m in the other location, I back up to an external drive.
I run a backup hourly to replace the Windows File History function which doesn’t work well - so I have two backup jobs, one for each location. Of course I get an error message each time the backup runs for the location where I am not at currently.
I’m trying to suppress the backup based on my current location. If I’m in A then suppress backup B and vice versa. I can determine my location using a Powershell script which works well for me. What I can’t figure out is how to use that information to suppress a backup. I’m pretty sure its by using the option run-script-before-required but I can’t figure it out.
The script currently returns a -1, if I am not in location A but I can’t figure out how to run a powershell script from duplicati.
Does anyone have any ideas?
This is my powershell script:
$MyLocation = (Invoke-WebRequest ipinfo.io | ConvertFrom-Json).city
if ($MyLocation -eq “Vancouver”)