Forked from gilyes/Backup, restore postgres in docker container
Created
June 17, 2021 08:40
-
-
Save dgierejkiewicz/b27e7bc530345c009f45f62d3561dd1d to your computer and use it in GitHub Desktop.
Revisions
-
gilyes revised this gist
Jun 16, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ 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 -Upostgres -
gilyes revised this gist
Jun 16, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ 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 -Upostgres -
gilyes revised this gist
Jun 16, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ Backup: docker exec -t -u postgres jira_postgres_1 pg_dumpall -c > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql Restore: cat your_dump.sql | docker exec -i your-db-container psql -Upostgres -
gilyes revised this gist
Jun 16, 2016 . 2 changed files with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ Backup: docker exec -t -u postgres jira_postgres_1 pg_dumpall -c > dump_`date +%d-%m-%Y"_"%H_%M_ %S`.sql Restore: cat your_dump.sql | docker exec -i your-db-container psql -Upostgres -
gilyes created this gist
Jun 16, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ docker exec -t -u postgres jira_postgres_1 pg_dumpall -c > dump_`date +%d-%m-%Y"_"%H_%M_ %S`.sql