backup and restore mongodb data

backup:

mongodump -h dbhost -d xianxia -o xianxia.mongo

restore

mongorestore -d  xianxia xianxia.mongo/xianxia/  

Leave a Reply

Your email address will not be published.