Hi,
I’m trying to mount a drive before running a backup (the drive is normally in a sleep state so needs to be unmounted for this). I am trying to use run-script-before to run the command “sudo mount /dev/sda1 /mnt/NAS” however this isn’t working because of needing sudo:
[Error-Duplicati.Library.Modules.Builtin.RunScript-InvalidExitCode]: The script “/config/mount.sh” returned with exit code 127: /config/mount.sh: line 3: sudo: command not found
But I am unable to run the command without sudo:
[Error-Duplicati.Library.Modules.Builtin.RunScript-InvalidExitCode]: The script “/config/mount.sh” returned with exit code 32: mount: /mnt/Backup: must be superuser to use mount. dmesg(1) may have more information after failed mount system call.
Is there a way to run scripts requiring sudo? I am using docker compose:
duplicati:
image: lscr.io/linuxserver/duplicati:latest
container_name: duplicati
environment:
- PUID=1000
- PGID=1000
- SETTINGS_ENCRYPTION_KEY=xxx
- DUPLICATI__WEBSERVICE_PASSWORD=xxx
- TZ=Europe/London
ports:
- “8200:8200”
volumes:
- /mnt/NAS/Config/Duplicati:/config
- /dev/sda1:/dev/sda1
- /mnt:/mnt