pythonprobr / pythonpro-website

GNU Affero General Public License v3.0
61 stars 63 forks source link

Upgraded docker postgres to 12.15 #4840

Closed renzon closed 1 year ago

renzon commented 1 year ago

Commands used to keep local db:

Backup

docker-compose up sudo cp .pgata .pgdata_old docker exec -it pythonpro_database /usr/bin/pg_dumpall -U pythonpro > dumpfile docker-compose down sudo rm -rf .pgdata

Update docker compose file and load backup

docker-compose up docker exec -i pythonpro_database psql -U pythonpro < dumpfile

Verify database and clean stuff if it´s ok

sudo rm -rf .pgdata_old rm dumpfile