(the line is taken from the nixos configuration file, that's why it also contains the user executing the operation)
it seems something breaks in the dumping process, because the script completes successfully but the sql dump file is an empty file (as can be noticed in the following output of rustic -r myrepo snapshots
You don’t need -it because you don’t run an interactive session in docker. It might be failing because you ask for a pseudoterminal in an environment where it doesn’t make sense.
You don’t need -it because you don’t run an interactive session in docker. It might be failing because you ask for a pseudoterminal in an environment where it doesn’t make sense.
I've tried first removing the -it flag as suggested by @farcaller@fstab.sh in another comment and see if that works out.
Otherwise I'll try to debug with a logfile as you suggested, thanks!
Thank you for pointing it out. I'll fix it as soon as possible and see if it solves the issue.
However, the script I pasted is fired by another script (called docker_backupper.sh, that is the one triggered by the cronjob and whose purpose is firing a specific script for each service to be backed up) and that script has the #!/bin/bash on top, so I fear adding it also to the "invoked scripts" won't change that much