That will restore all the files in the dump/app12345678 directory created by mongodump in the step above. Your mongorestore should look like this: mongorestore \ In my case, the right one was the one listed second, but you can double-check by looking at the Admin section of the Compose panel (look for “Mongo Console”). You should get something like this: that there's two hosts and ports listed. You'll need your Heroku app's MONGOHQ_URL environment variable for the credentials: heroku config:get MONGOHQ_URL This will produce a dump directory containing the data: dump Note: the -dbpath option is only supported in MongoDB 2.6, hence why we had to install it. Inside the directory above, run: mongodump -dbpath. In my case, I ended up with a directory that looked like this. Download and extract the backupĮxtract tarball. (Once you're finished, you can run brew uninstall homebrew/versions/mongodb26 and re-run brew install mongodb.) 2. Install MongoDB 2.6: brew install homebrew/versions/mongodb26 Uninstall your local MongoDB: brew uninstall mongodb Install Homebrew versions, if you don't already have it: brew tap homebrew/versions Important: Make sure you back up before you do this. I found it easiest to uninstall mongodb and install it using homebrew-versions. The 2.8 versions of MongoDB tools, mongodump, mongorestore, mongoexport, mongoimport, mongofiles, and mongooplog, must connect to running MongoDB instances and cannot modify MongoDB data files (i.e. The short version is, you need to produce a set of BSON/JSON files from your backup in order to restore it. I was surprised when Compose's support team asked if I could install MongoDB 2.6. But first, some key information: Backups aren't 3.0-friendlyĮach of these downloads is in a format that's not easy to import into MongoDB 3.0. The rest of this article will go into more detail.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |