MongoDB 2.0 Upgrade Guide & Profile Viewer Recommendation

MongoDB 2.0 just turned stable last month and I’ve spent about 10 minutes earlier today to upgrade a small Fedora cluster (one of the development environments). See the step by step guide for pre-1.8 version upgrade on Fedora below and check out all the new features at http://blog.mongodb.org/post/10126837729/mongodb-2-0-released.

Thanks to Mongo’s improved profiler, you now can also make more sense of the logs. I highly recommend using a profile viewer called Professor (written in Python and Flask by one of the 10gen developers).

Upgrade to MongoDB 2.0 in 9 steps

# 1. start mongo if it's not already running
/etc/init.d/mongod start

# 2. make a backup of the existing collections
mongodump

# 3. stop mongo
/etc/init.d/mongod stop

# 4. remove the previous version
rpm -e mongodb mongodb-server

# 5. add one of the following yum repos
vi /etc/yum.repos.d/10gen.repo

	# 64-bit
	[10gen]
	name=10gen Repository
	baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64
	gpgcheck=0
# OR
	# 32-bit
	[10gen]
	name=10gen Repository
	baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/i686
	gpgcheck=0

# 6. update all packages and install the new version of MongoDB
yum update
yum install mongo-10gen
yum install mongo-10gen-server

# 7. start the mongo service
/etc/init.d/mongod start

# 8. restore from the dump
mongorestore

# 9. confirm version 2.0 & restored backups via the mongo cli
mongo
show dbs
Advertisement

Tags:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.

Join 1,851 other followers