Skip to content

Instantly share code, notes, and snippets.

View Hendrik44's full-sized avatar

Hendrik Jürst Hendrik44

View GitHub Profile
@Hendrik44
Hendrik44 / Backup, restore postgres in docker container
Last active January 12, 2018 19:33 — forked from gilyes/Backup, restore postgres in docker container
Backup/restore postgres in docker container
Backup:
docker exec -t -u postgres your-db-container pg_dumpall -c > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql
Restore:
cat your_dump.sql | docker exec -i your-db-container psql -U postgres postgresDatabaseName