Last active
January 13, 2021 12:41
-
-
Save simonthompson99/e944d4256f6a270a70b7d24481a9169d to your computer and use it in GitHub Desktop.
[Timestamped db dump] Make a timestamped pg_dump of schema in database #sql #bash #database
This file contains 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
#!/bin/bash | |
current_time=$(date "+%Y%m%d-%H%M") | |
file_name="db_bu_$current_time.sql" | |
echo $file_name | |
pg_dump -h 10.1.24.39 -U cdt_user --schema consent_audit metrics > $file_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment