Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Save documents from OpenShift Mongodb

I have a scalable app in OpenShift with MongoDb2.2 ad NodeJs0.10,

Since i can't use Cartridge rockmongo-1.1 because it cannot be embedded in scalable app,

How can i get my db'documents and do a Backup and Restore with ssh ?

like image 233
jay Avatar asked Oct 03 '22 16:10

jay


1 Answers

Make sure you use the RHC command line tools.

You have two ways to get to your data:

1) You can ssh into your gear (as a shortcut you can do rhc ssh {app-name}). Then you can do the dump and restore at the console. Remember, you only have write permissions to the ~/app-root/data and /tmp directory so make sure to put your output there. Then you can scp your files back and forth.

2) You can you*rhc port forward* to port forward you MongoDB terminal and commands to you local machine. You will still need the MongoDB username and password we assigned to your instance on creation.

like image 151
TheSteve0 Avatar answered Oct 10 '22 19:10

TheSteve0