This is an awkward step so I figured I’d add a note on how to get it done… I assume this is a pretty dumb way of doing it but hey, works for now.
To back up the databases:
docker exec -t db_container_name pd_dumpall -c -U postgres > dump`date +%d-%m-%Y"_"%H_%M_%S`.sql
and to restore from the backup:
cat your_dump.sql | docker exec -i db_container_name psql -U your_username