Last active
May 4, 2023 12:57
-
-
Save brian-xu-vlt/21f8703307c81c963d108bd4a4931bf9 to your computer and use it in GitHub Desktop.
dbsync/dbrestor
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 characters
| alias dbsync-clean-local='rm ~/CODE/dbsync/local-*.pgdump' | |
| alias dbsync-clean-prod='rm ~/CODE/dbsync/production-*.pgdump' | |
| alias dbsync-clean='dbsync-clean-local; dbsync-clean-prod' | |
| alias dbsync-local-to-local='z infra && myke marketplace-local/db_dump && cp /tmp/marketplace-local.pgdump ~/CODE/dbsync/local-$(date +%F_%H-%M-%S).pgdump ; cd -' | |
| alias dbsync-prod-to-local='z infra && myke marketplace-production/db_dump && cp /tmp/marketplace-production.pgdump ~/CODE/dbsync/production-$(date +%F_%H-%M-%S).pgdump ; cd -' | |
| alias dbrestore-local-to-local='z infra && myke marketplace-local/db_restore_from_dump --PGDUMP_PATH=$(ls /Users/brian/CODE/dbsync/local* | sort | tail -1) ; cd -' | |
| alias dbrestore-prod-to-local='z infra && myke marketplace-local/db_restore_from_dump --PGDUMP_PATH=$(ls /Users/brian/CODE/dbsync/production* | sort | tail -1) ; cd -' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment