Browsing the archives for the Administration category

Easily Move Documents Between Collections or Databases

in Administration, Querying

TweetDoes this senario sound familiar? The good news: your new super amazing mashup is becoming super popular, its getting featured on tech blogs and podcasts w00t! You’ve used MongoDB for your database backed and so things have been scaling pretty well, and your analytics you have been tracking are really adding up, like millions and millions [...]

1 Comment

Compacting MongoDB Collections

in Administration

TweetA while back we wrote a post explaining how to compact MongoDB data files, that example shows how to use some server side javascript and a cron job to automatically compact the data files on a schedule … however this isn’t always ideal as it will compact all the collections in a database at one [...]

1 Comment

Quick Tip: Copy DBs Between Servers

in Administration, Quick Tip

TweetInspired by this Stackoverflow question I thought it would be worth while to post this quick tip … If you ever need to copy (or “clone”) a MongoDB databse between two MongoDB servers its as easy as running the copyDatabase() command. First, change into your admin db … Then, run copyDatabase() supplying the needed information, the [...]


Compacting MongoDB Data Files

in Administration, Stackoverflow

Tweet StackOverflow Anwser Series This is a new “concept” post based on StackOverflow Questions/Answers. Feel free to comment below if this format is helpful & informative! Overview This Answer covers the following MongoDB topics: Data Files Compacting Data Files The db.repairDatabase(); command Capped Collections Server-side Javascript Question StackOverflow Link Is there a way to auto compact MongoDB [...]


Quick Tip: Using Users in MongoDB

in Administration, Quick Tip

TweetBy default a MongoDB install does not use a username/password combination to access the database. No Password, But Why? This is down to the design philosophy of MongoDB which is to push much of the “logic” to the application level and keep the database doing what databases do best! Hence,  given the way that MongoDB [...]