0

I'm trying to create a backup server for my mongodb using the strategy of copying files.

I wonder what is Diagnostic.data folder? Should I copy that too? or I can simply ignore it?

My Diagnostic.data folder size is around 300MB that is bigger than my other database files.

What about journal folder? Can I ignore it too?

2

The diagnostic.data file contains the result of db.serverStatus() command in binary format. This will be used by the MongoDB engineers to analyze the behavior of the server if any error happens.

It is not necessary to take a backup of this file.

0

I wonder what is Diagnostic.data folder? Should I copy that too? or I can simply ignore it? My Diagnostic.data folder size is around 300MB that is bigger than my other database files.

As per MongoDB blog documentation here There is no available tool to read/view the index files or journal files for a mongod instance.

You can inspect the diagnostic.data/metrics.* files using the bsondump utility. The contents are outputs of the db.serverStatus() command saved in a binary format.

The index files and journal files should not be viewed directly. Instead, it is recommended and best practice to view information relating to indexes, by running commands from the mongo shell to query the database. For example, to get a list of indexes for the test collection, run the following command:

db.test.getIndexes()

The index files, journal files, WiredTiger files are binary files stored in binary format. These are only readable by the MongoDB database and is not human readable, thus it means we cannot sample/view these binary files directly.Also, let us know the signification of all .wt, .turtle, .bson files in the dbpath (data directory) and let us know how to read them.

When using MongoDB with the WiredTiger storage engine, there are different sets of files in the $dbpath.

MongoDB internal and lock files:

storage.bson
mongod.lock

WiredTiger metadata files:

WiredTiger.lock
WiredTiger
WiredTigerLAS.wt
sizeStorer.wt
_mdb_catalog.wt
WiredTiger.wt
WiredTiger.turtle

What about journal folder? Can I ignore it too?

To provide durability in the event of a failure, MongoDB uses write ahead logging to on-disk journal files.

Note: The log mentioned in this section refers to the WiredTiger write-ahead log (i.e. the journal) and not the MongoDB log file.

  • 1
    Sorry, you did not answer my question. Can I ignore Diagnostic.data and journal folders for backups? – AminSojoudi Sep 17 at 10:01
  • @AminSojoudi,No. These files are required in troubleshooting. – Md Haidar Ali Khan Sep 17 at 10:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.