-
-
Save luanpcweb/5b7de1d0b995cff2b8273fd43f6e817c to your computer and use it in GitHub Desktop.
Revisions
-
luanpcweb revised this gist
Dec 30, 2022 . 1 changed file with 10 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 @@ -10,7 +10,16 @@ pv $BACKUP | docker exec -i $CONTAINER /usr/bin/mysql -u $MARIA_DB_USER --passwo ## PORTGRESS # Backup docker exec -t CONTAINER pg_dump --schema-only -U postgres > structure.sql ## Only structure or with exclued table data docker exec -t docker_postgres pg_dump --schema-only -U postgres > structure.sql docker exec -t docker_postgres pg_dump postgres --exclude-table-data='public.sites_acessos' --exclude-table-data='public.views_e_cliques' --exclude-table-data='public.movimentacoes' -U postgres > bck.sql ### docker exec -i postgress_dev_upee /bin/bash -c "PGPASSWORD=upeetest2020 pg_dump --username postgres postgres" > backup.sql -
luanpcweb revised this gist
Sep 5, 2022 . 1 changed file with 2 additions and 0 deletions.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 @@ -12,5 +12,7 @@ pv $BACKUP | docker exec -i $CONTAINER /usr/bin/mysql -u $MARIA_DB_USER --passwo # Backup docker exec -t CONTAINER pg_dumpall -c -U postgres > backup.sql docker exec -i postgress_dev_upee /bin/bash -c "PGPASSWORD=upeetest2020 pg_dump --username postgres postgres" > backup.sql # Restore cat your_dump.sql | docker exec -i CONTAINER psql -U postgres -
luanpcweb revised this gist
Sep 5, 2022 . 1 changed file with 8 additions and 0 deletions.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 @@ -6,3 +6,11 @@ cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root pv $BACKUP | docker exec -i $CONTAINER /usr/bin/mysql -u $MARIA_DB_USER --password=$MARIA_DB_PASS $MARIA_DB_NAME ## PORTGRESS # Backup docker exec -t CONTAINER pg_dumpall -c -U postgres > backup.sql # Restore cat your_dump.sql | docker exec -i CONTAINER psql -U postgres -
luanpcweb revised this gist
Jul 28, 2022 . 1 changed file with 2 additions and 0 deletions.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 @@ -4,3 +4,5 @@ docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > back # Restore cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE pv $BACKUP | docker exec -i $CONTAINER /usr/bin/mysql -u $MARIA_DB_USER --password=$MARIA_DB_PASS $MARIA_DB_NAME -
Santiago Palladino created this gist
Dec 22, 2015 .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,6 @@ # Backup docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql # Restore cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE