-->

Friday, August 15, 2014

how to migrate your mongodb into a bigger volume

First stop your mongodb
sudo service mongod stop
Assuming that your existing mongo installation is on /var/lib/mongodb/
sudo mv /var/lib/mongodb/ /your/preferred/destination/for/mongo/
set the rights correctly
sudo chmod -R mongodb.mongodb /your/preferred/destination/for/mongo/
and update the mongodb configuration file

# dbpath=/var/lib/mongodb 
dbpath= /your/preferred/destination/for/mongo/

No comments:

Post a Comment