docker run --rm -v $(pwd):/data -e RESTIC_REPOSITORY=s3:s3.amazonaws.com/bucket_name -e RESTIC_PASSWORD=my-secure-password
-e AWS_ACCESS_KEY_ID=my-aws-access-key -e AWS_SECRET_ACCESS_KEY=my-aws-secret-key instrumentisto/restic backup /data
thats the example call for the restic container. I just changed the needed parameters.
The script just contains these calls with different folders.
when i run the shell script this happens:
root@nas:/mnt/user/myscripts/resticNasBackup# ./resticBackuphtpc.sh
does not exist, skipping
Fatal: all target directories/files do not exist
does not exist, skipping
...
it looks like the when the script is executed the target vars are not set properly. i don't understand why.
if i copy and paste a single docker run call from the script to the console it is running, no issue.
root@nas:~# docker run --rm -v /mnt/user/fotos:/fotos -e RESTIC_REPOSITORY=s3:http://10.24.13.148:9000/backupnas -e RESTIC_PASSWORD= -e AWS_ACCESS_KEY_ID= -e AWS_SECRET_ACCESS_KEY= instrumentisto/restic --verbose backup /fotos
open repository
created new cache in /root/.cache/restic
lock repository
load index files
start scan on [/fotos]
start backup on [/fotos]