Changing MongoDB data store directory

Until now I have not been specifying a MongoDB data directory and have had only one 30 GB primary partition.

I just ran out of space and added a new hard disk. How can I transfer my data (that is apparently in /var/lib/mongodb/) and configure MongoDB so that everything runs off of the new disk without affecting my existing installation?

10 Answers
10

Leave a Comment