Backup your databases
docker exec -t YOUR_DB_CONTAINER_NAME pg_dumpall -c -U postgres > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql
Restore your databases
cat YOUR_DUMP.sql | docker exec -i YOUR_DB_CONTAINER_NAME psql -U postgres
truncate -s 0 /var/lib/docker/containers/*/*-json.log