All about unix linux freebsd and FAQ for Packetlove.com Web hosting , Mail hosting , VoIP + IP PBX server > all application on unix knowledges by golfreeze

mongodb dump and restore only specific collection or table

(1/1)

golfreeze:
mongodb dump and restore only specific collection or table
database : test123
collection-name : ProductManager

===mongodump only collection
/usr/bin/mongodump -h localhost -d test123 --collection=ProductManager -o /home/test/backup_mongo/

===mongorestore only collection
mongorestore --db=test123 --collection=ProductManager /home/test/backup_mongo/test123/ProductManager.bson

นำร่อง

[0] ดัชนีข้อความ

Go to full version