Backup your databases
docker exec -t your-db-container pg_dumpall -c -U postgres > dump_`date +%Y-%m-%d"_"%H_%M_%S`.sql
or dump only needed tables
docker exec -t your-db-container pg_dump -c -U test_user --table mytable1 --table mytable12 postgres > dump_`date +%Y-%m-%d"_"%H_%M_%S`.sql