Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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
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
@martinbrambati

This comment has been minimized.

Show comment Hide comment
@martinbrambati

martinbrambati Jan 21, 2014

Great man! thanks!

Great man! thanks!

@pengjiayou

This comment has been minimized.

Show comment Hide comment
@pengjiayou

pengjiayou May 17, 2015

Great, thanks.

Great, thanks.

@souvikbasu

This comment has been minimized.

Show comment Hide comment
@souvikbasu

souvikbasu Jun 4, 2015

Nice

Nice

@weplan9

This comment has been minimized.

Show comment Hide comment
@weplan9

weplan9 Jun 24, 2015

Thanks

weplan9 commented Jun 24, 2015

Thanks

@edenir-anschau

This comment has been minimized.

Show comment Hide comment
@edenir-anschau

edenir-anschau Jan 25, 2016

Thanks!

Thanks!

@ramrumram

This comment has been minimized.

Show comment Hide comment
@ramrumram

ramrumram Feb 16, 2016

thank you

thank you

@diegobabativa

This comment has been minimized.

Show comment Hide comment
@diegobabativa

diegobabativa Feb 16, 2016

I was trying all ways, but now it works, Thank you so much !

I was trying all ways, but now it works, Thank you so much !

@oing9179

This comment has been minimized.

Show comment Hide comment
@oing9179

oing9179 Jul 20, 2016

This is definitely helpful, thank you.

This is definitely helpful, thank you.

@gautamkrishnar

This comment has been minimized.

Show comment Hide comment
@gautamkrishnar

gautamkrishnar Jul 31, 2016

Thanks a lot 😄

Thanks a lot 😄

@Ashaba

This comment has been minimized.

Show comment Hide comment
@Ashaba

Ashaba Aug 29, 2016

what could have gone wrong?
bash: rms.sql: Permission denied

Ashaba commented Aug 29, 2016

what could have gone wrong?
bash: rms.sql: Permission denied

@danielcooperxyz

This comment has been minimized.

Show comment Hide comment
@siripuramrk

This comment has been minimized.

Show comment Hide comment
@siripuramrk

siripuramrk Dec 24, 2016

Works!
Thank you.

Works!
Thank you.

@teliz

This comment has been minimized.

Show comment Hide comment
@teliz

teliz Mar 8, 2017

Thanks :)

teliz commented Mar 8, 2017

Thanks :)

@ashim888

This comment has been minimized.

Show comment Hide comment
@ashim888

ashim888 Sep 30, 2017

Great

Great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment