Skip to content

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

  1. Connect through mongosh with permission to run database statistics.
  2. Run db.stats() for each application database in scope.
  3. Record dataSize, storageSize and indexSize separately, with their scale and units.
  4. Review document counts and the earliest relevant timestamps. Atlas cluster metrics provide another storage cross-check.
dataSize is uncompressed document data. storageSize is allocated collection storage and excludes the separately reported index size.

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.

Add the dates covered and the people who use this software. Label estimates and describe how you calculated them.

Export your MongoDB history

  1. Have the administrator plan a consistent collection appropriate to the deployment and write activity.
  2. Use mongodump for BSON documents and collection metadata in the agreed databases.
  3. For a replica set, review the supported oplog option where appropriate; sharded deployments require their own consistency plan.
  4. 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.

Your data inventory

Add your numbers to the picture.

Enter the quantities and years covered in your data inventory, then share it with your Telegraph Lab contact. We’ll review the material and discuss the next step with you.

Discuss your data