I backup the server's MongoDB database with mongodump
. Now I want to inspect the backup of the database.
The backup is in BSON and JSON formats:
$ ls <db-name> contacts.bson contacts.metadata.json ...
I want to run simple commands on the database, such as db.contacts.find({})
and possibly also complex ones, such as aggregation and projection.
I could use mongo-restore
which would overwrite the production database. I could transfer it to another machine and restore it too. Both strike me as non-agile.
Does MongoDB allow quick inspection of a database backup?