gviaud icon

Restore particular collection from BSON backup

gviaud | PRO | 01/04/17 06:56:51 PM UTC | 0 ⭐ | 241 👁️ | Never ⏰ | []
text |

350 B

|

None

|

0 👍

/

0 👎

The following restores a collection created with mongodump
 Note:  The use of --authenticationDatabase seems to be needed if using the admin user and not a user for the particular target DB.
  mongorestore -h [HOST]:27017 -u [USER] -p [PASSWORD] --authenticationDatabase admin --db [TARGET_DATABASE] --collection [COLLECTION_NAME] [COLLECTION_FILE.bson]

Comments