Last active
April 16, 2016 13:20
-
-
Save skyebook/3407646 to your computer and use it in GitHub Desktop.
Backup OpenShift PostgreSQL Database
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
#!/bin/bash | |
# Backs up the OpenShift PostgreSQL database for this application | |
# by Skye Book <[email protected]> | |
NOW="$(date +"%Y-%m-%d")" | |
FILENAME="$OPENSHIFT_DATA_DIR/$OPENSHIFT_APP_NAME.$NOW.backup.sql.gz" | |
pg_dump $OPENSHIFT_APP_NAME | gzip > $FILENAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
does not work if database is on separate gear.