I have a web app that is built with docker and I’d like to use restic to backup my database. I want to run restic from inside docker to try and keep the list of software to install on the host as small as possible.
My current strategy is to have a backup script that first generates a database dump from Postgres to a folder on the host, it then runs the command
docker run --rm --interactive --tty=false --init -v ./backups:/data -v ./restic-pass:/pass:ro -v restic-cache:/cache --env-file ./.env restic/restic:0.9.6 --cache-dir /cache -p /pass backup /data.
This works but I guess because of the way docker mounts the volumes restic always picks up the files to back up as new, restic does seem to be deduping the files so its not adding a new full copy to the repo each time, but will constantly detecting the files as new cause me an issue going forward? I have also tried with the --force and --ignore-inode switches but these don’t seem to make a difference.