Database Reference
In-Depth Information
Learning about bsondump
The
bsondump
process is used to convert the BSON format data to common data
formats such as JSON. Essentially,
bsondump
comes in handy when developers want to
convert dump files that are generated by
mongodump
to human-readable formats.
A very simple usage of this command is shown in the following command line:
bsondump data.bson>data.json
Understanding mongooplog
The
mongooplog
is a utility that duplicates
oplog
from one server to another server,
for instance, in order to perform a migration task. In order to perform the migration opera-
tion,
mongooplog
accepts two parameters, the
from
and
to
server addresses.
Note
What is oplog?
The
oplog
or operation log is a capped collection (a fixed-sized collection) of data that
keeps the record of all data altering operations. In further chapters, we will explain this
feature in detail.
The following is a simple usage of this command:
mongooplog --from server1 --host server2
The preceding command line will connect to the MongoDB instance of
server1
and
copy the entire
oplog
to
server2
instance.