patternMinor
Does MongoDB produce a single file like sqlite does for an individual database? Can it?
Viewed 0 times
canfileproduceindividualmongodbsqlitelikedatabasesinglefor
Problem
Does MongoDB store it's data like SQLite does at all? A single file. From what I could see it is using "wiredTiger," but I can't find a specific file for my database I created.
Solution
As at MongoDB 3.4, all of the standard storage engines (WiredTiger, MMAPv1, ..) create multiple files in the
The file and directory layout is dependent on the storage engine and server configuration options, so it is conceivable that someone could develop a new MongoDB storage engine which has a more concise file layout (but I'm not aware of anyone having done so).
Irrespective of the layout on disk, you could use the standard
dbPath. For example, in WiredTiger there are a number of metadata files, journal files, and a file per collection and per index (see: Why is an empty MongoDB database so big?). Multiple files generally allow more granular concurrency and storage management; single-file databases are more common for embedded use cases.The file and directory layout is dependent on the storage engine and server configuration options, so it is conceivable that someone could develop a new MongoDB storage engine which has a more concise file layout (but I'm not aware of anyone having done so).
Irrespective of the layout on disk, you could use the standard
mongodump utility to create a single compressed & archived backup of a database to copy and restore on another system using mongorestore. The archive feature is available in MongoDB 3.2 or newer. For more information, see Archiving and Compression in MongoDB Tools.Context
StackExchange Database Administrators Q#155348, answer score: 3
Revisions (0)
No revisions yet.