Error running pre-backup script

Hello, looking for some assistance - running on Ubuntu Server (fully patched) 22.04 with Duplicati 2.1.0.2_beta_2024-11-29.

Backups were running ok before upgrading to the latest Duplicati (though had to restore the database as the upgrade wiped it).

One of my backup jobs runs a pre-backup script (stored in root called mountsyn.sh), which mounts an NFS target on my Synology NAS:

echo "$(date) Starting script, about to mount synology" > $logfile
sudo mount -t nfs -o mountvers=3 192.168.1.xxx:/volume1/ServerBackups /synology
echo "$(date) returned from mounting synology call" >> $logfile

This is where the backup files are stored. Ever since the upgrade I’m now getting this error:
“* 2025-01-05 11:40:29 +00 - [Warning-Duplicati.Library.Modules.Builtin.RunScript-ScriptExecuteError]: Error while executing script “./mountsyn.sh”: An error occurred trying to start process ‘./mountsyn.sh’ with working directory ‘/usr/lib/duplicati’. No such file or directory Win32Exception: An error occurred trying to start process ‘./mountsyn.sh’ with working directory ‘/usr/lib/duplicati’. No such file or directory”

I can see from the logging in the script that it’s not called.

I’ve tried to repair the database, reboot the Ubuntu server, but can’t clear this error. I’ve checked and the permissions on the script haven’t changed.

Anyone any ideas?

Welcome to the forum @Michael_Kennedy

In my testing (where error is guaranteed as I have no such file) the path is what’s reported.

If you’re using leading dot, it means current directory. Try starting with / to mean in the root.

Having said that, I wonder if the default current directory of Duplicati inadvertently changed.

How do you run Duplicati? The systemd one? My error is saying that working directory is /.

Does “restore” mean the Recreate button (if enabled) or the Repair button (if no Recreate)?

The database is supposed to be converted and working AFAIK. If it wasn’t, it’s worth a look.

What was the evidence for “wiped”?

1 Like

Removing the leading ‘.’ fixed it! It’s been like that since I first setup Duplicati, I guess my working folder was the root before and this changed with the new install.

I think it went wrong for me during the upgrade, I removed it as part of a guide I was following (which I can’t find now), but I had an export of the jobs. Long story short, it didn’t work so I removed, reinstalled and re-created the backup jobs - then had this error, but all working now, which is awesome!

2 Likes