Sauvegarde d’une base de données

docker exec -i mayan-edms-postgres /bin/bash -c "PGPASSWORD=mayanuserpass pg_dump --username mayan mayan" > /volume1/docker/mayan-edms/postgres/dump.sql

Restauration d’une base de données

docker exec -i mayan-edms-postgres /bin/bash -c "PGPASSWORD=mayanuserpass psql --username mayan mayan --set ON_ERROR_STOP=on" < /volume1/docker/mayan-edms/postgres/dump.sql

Source:

  • https://www.cloudytuts.com/tutorials/docker/how-to-upgrade-postgresql-in-docker-and-kubernetes/