Databases and warehouses
Find and export
your MongoDB data.
MongoDB reports several size measures for the same database. Logical document size and allocated disk storage can differ because of compression, indexes and free space.
- Report in
- GB
- Category
- Databases and warehouses
- Last checked
Find your MongoDB data size
- Connect through mongosh with permission to run database statistics.
- Run db.stats() for each application database in scope.
- Record dataSize, storageSize and indexSize separately, with their scale and units.
- Review document counts and the earliest relevant timestamps. Atlas cluster metrics provide another storage cross-check.
What to include in your data inventory
Report in GB with the measurement basis, databases and collections identified. Add document counts where available.
Describe file storage such as GridFS or external object stores, the business date coverage and application scope.
Export your MongoDB history
- Have the administrator plan a consistent collection appropriate to the deployment and write activity.
- Use mongodump for BSON documents and collection metadata in the agreed databases.
- For a replica set, review the supported oplog option where appropriate; sharded deployments require their own consistency plan.
- Collect external files separately and verify the archive's collection coverage.
mongoexport provides JSON or CSV for selected collections and serves a different purpose from a database backup.
BSON can represent types that need special handling in simpler formats. Preserve schema and type context with the data.
Why MongoDB data has value for AI training
Document collections can capture complete application events with their nested business context.
Collection and field descriptions help connect those events to the workflows they represent.
What stays private
Select databases, collections and fields in scope, reviewing personal information and sensitive application content.
Telegraph Lab reviews the proposed material with you and agrees how sensitive information will be handled. Preparation can include excluding material, redacting details and replacing personal identifiers. Your company keeps ownership; the licensing agreement defines the material, permitted uses and authorized recipients.
Common questions about MongoDB data
Why is dataSize larger than storageSize?
Compression can make allocated storage smaller than uncompressed document data.
Does storageSize include indexes?
MongoDB reports indexSize separately.
Is mongoexport a full backup?
MongoDB distinguishes it from mongodump. Choose the route according to the required data and type coverage.
Will the dump include external media?
Collect external file storage separately and retain its document relationships.