Are there any tips on scripting database backups? I’ve written a small script based on the recommended commands (https://docs.tutor.overhang.io/local.html#backups-migrating-to-a-different-server), to backup the database automatically during the backup process. I found I got the following error:
the input device is not a TTY
Searching around I found that this is a docker issue and I set
export COMPOSE_INTERACTIVE_NO_CLI=1 in my script. I now get the error:
ValueError: I/O operation on closed file.
Is there any way of scripting the database dump so it can be run during a backup process, for example from bacula or CRON?