Created
February 2, 2013 13:07
-
-
Save nicdoye/4697265 to your computer and use it in GitHub Desktop.
Backup your OpenShift MySQL database. My DB is only small so I didn't bother to compress it through a pipe. sftp it back from your local machine afterwards This is basically a quick hack from running "type mysql" on the OpenShift gear - hint: it's a bash function/alias
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
mkdir ~/app-root/data/tmp | |
mysqldump -h $OPENSHIFT_MYSQL_DB_HOST -P ${OPENSHIFT_MYSQL_DB_PORT:-3306} -u ${OPENSHIFT_MYSQL_DB_USERNAME:-'admin'} --password="$OPENSHIFT_MYSQL_DB_PASSWORD" --all-databases > ~/app-root/data/tmp//all.sql |
Openshift recommend $OPENSHIFT_TMP_DIR
https://developers.openshift.com/managing-your-applications/filesystem.html#tmp
Works!
Thank you.
Thanks :)
Great
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
what could have gone wrong?
bash: rms.sql: Permission denied