Infrastructure for base server
chmod +x scripts/create-multiple-postgresql-databases.sh
For pgAdmin:
sudo chown -R 5050:5050 <host_directory>
Backup:
docker exec -t <postgres-container-id> pg_dumpall -c -U <user> > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql
Restore:
cat <dump_name>.sql | docker exec -i <postgres-container-id> psql -U <user>
# host = container_name
postgres://username:password@container_name:port/db_name