Re: Backup for MongoHQ Data

2010-08-27 Thread marcel
There is a warning on the mongodb site about using mongoexport/ mongoimport: Neither JSON nor TSV/CSV can represent all data types. Please be careful not to lose or change data (types) when using this. For full fidelity please use mongodump.

Re: Backup for MongoHQ Data

2010-08-26 Thread Chris Hanks
Not sure what that error message means, sorry. You might ask in the MongoDB google group - 10gen is good about helping users with issues: http://groups.google.com/group/mongodb-user Also, I should have mentioned before that there's a guide to mongorestore and the other MongoDB import/export

Re: Backup for MongoHQ Data

2010-08-26 Thread Hemal Kuntawala
I use a mongoexport mongoexport -h [host]:[port] -d [database] -u [user] -p [password] -c [collection] -o [path, e.g. ~/tmp/mongoexport/export.json] And a mongoimport mongoimport -h [host]:[port] -d [database] -u [user] -p [password] -c [collection] --file [file, e.g.

Re: Backup for MongoHQ Data

2010-08-26 Thread Ginny Hendry
And the answer is: To restore the dump to your local instance of Mongo, make sure you're in the original directory (the one with subdirectory 'dump') and type mongorestore I was trying too hard, I guess. : ) Hemal's suggestion of mongoexport makes a nice readable JSON file for one collection

Backup for MongoHQ Data

2010-08-25 Thread Ginny Hendry
Am I right in assuming that Heroku bundles don't include MongoHQ data? Do db:pull or taps work with MongoHQ? If not, what are our options for backup and restore for MongoHQ databases? I'm sure MongoHQ has backups in case their disks crash but I need my own backups in case I or a user destroys

Re: Backup for MongoHQ Data

2010-08-25 Thread Chris Hanks
Use the mongodump utility from the command line. It comes with mongodb, and can be pointed at whatever remote database you like. For example, try a ruby script that looks something like: host = 'flame.mongohq.com:27000' db = 'ginnys-database' user = 'ginny' pass = 'password' `mongodump