PostgreSQL: Backup/Restore database from/to postgres docker.

/* 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 */

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.