MongoDB's backup and restore

28 Jun 2012

I blog this as a reference.

Backup:

./mongodump --db [dbname] --out [some_dir]

Restore:

./mongorestore --db [dbname] --drop [the_backup_dir]

Give it a kudos