Skip to content

Instantly share code, notes, and snippets.

Embed
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.

Copy link

@martinbrambati martinbrambati commented Jan 21, 2014

Great man! thanks!

@pengjiayou

This comment has been minimized.

Copy link

@pengjiayou pengjiayou commented May 17, 2015

Great, thanks.

@souvikbasu

This comment has been minimized.

Copy link

@souvikbasu souvikbasu commented Jun 4, 2015

Nice

@weplan9

This comment has been minimized.

Copy link

@weplan9 weplan9 commented Jun 24, 2015

Thanks

@edenir-anschau

This comment has been minimized.

Copy link

@edenir-anschau edenir-anschau commented Jan 25, 2016

Thanks!

@ramrumram

This comment has been minimized.

Copy link

@ramrumram ramrumram commented Feb 16, 2016

thank you

@diegobabativa

This comment has been minimized.

Copy link

@diegobabativa diegobabativa commented Feb 16, 2016

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

@oing9179

This comment has been minimized.

Copy link

@oing9179 oing9179 commented Jul 20, 2016

This is definitely helpful, thank you.

@gautamkrishnar

This comment has been minimized.

Copy link

@gautamkrishnar gautamkrishnar commented Jul 31, 2016

Thanks a lot 😄

@Ashaba

This comment has been minimized.

Copy link

@Ashaba Ashaba commented Aug 29, 2016

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

@danielcooperxyz

This comment has been minimized.

Copy link

@danielcooperxyz danielcooperxyz commented Nov 3, 2016

@siripuramrk

This comment has been minimized.

Copy link

@siripuramrk siripuramrk commented Dec 24, 2016

Works!
Thank you.

@teliz

This comment has been minimized.

Copy link

@teliz teliz commented Mar 8, 2017

Thanks :)

@ashim888

This comment has been minimized.

Copy link

@ashim888 ashim888 commented Sep 30, 2017

Great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.