How to find and export your MongoDB data.
MongoDB reports size per database with db.stats(). dataSize is the uncompressed size of your documents and storageSize is the compressed disk space allocated to them. Report the sum of dataSize in GB; on MongoDB Atlas the same figures appear in cluster metrics.
Where MongoDB shows how much you have.
- Connect with mongosh as a database user allowed to run the dbStats command on each database.
- Print every database's figures in GB:
db.adminCommand({listDatabases: 1}).databases.forEach(d => { const s = db.getSiblingDB(d.name).stats(1073741824); print(d.name, s.dataSize, s.storageSize, s.indexSize, s.objects); }) - On MongoDB Atlas, open the cluster's Metrics tab. The DB Storage chart shows dataSize (logical, uncompressed) and storageSize (compressed on disk).
Plan and role. Works on any MongoDB server or Atlas cluster. You need a database user who can run dbStats, or access to the Atlas project to view cluster metrics.
What to report on the Polyshares intake.
Report MongoDB in GB. The intake also asks how many years the company has used it and how many seats it has.
On the Polyshares intake, report total dataSize in GB, leaving out the admin, local and config system databases. With WiredTiger compression, storageSize is smaller and does not shrink when documents are deleted, so it measures disk use rather than data held; indexSize is separate and should not be added. For years in use, find the oldest document in your main collections, for example db.orders.find().sort({_id: 1}).limit(1) when _id is a default ObjectId, which embeds its creation time. For seats, count the users or accounts your collections describe.
Export the full history.
- Dump the whole cluster to one compressed archive, reading from secondaries:
mongodump --uri="mongodb+srv://user@cluster0.example.mongodb.net" --readPreference=secondary --gzip --archive=full-dump.gz - On a replica set, add --oplog to capture writes made while the dump runs. It cannot be combined with --db, --collection or --query, and it does not work through mongos on a sharded cluster.
- For JSON or CSV copies of single collections, use
mongoexport --db=app --collection=orders --out=orders.json. MongoDB warns it is not a backup tool.
mongodump writes BSON documents and collection metadata, including index definitions but not index data. mongoexport writes JSON or CSV, and JSON cannot represent every BSON type, so use mongodump for a complete copy. On sharded clusters, stop the balancer and pause cross-shard transactions during the dump. mongodump cannot export collections that use Queryable Encryption.
The intake only needs the size, so you do not have to run an export to fill it in. You also do not need to clean or scrub an export. Polyshares handles anonymization before anything moves.
Why MongoDB data has value for AI training.
MongoDB collections often store whole application objects as documents: a user profile with its settings, an order with its line items, a conversation with its messages. Nested structure keeps related facts and their timestamps together, so each record reads as a complete history.
What stays private.
mongodump can be limited to the databases and collections you name with --db and --collection, so authentication data and sensitive collections stay behind.
We anonymize identifying details before anything moves. Polyshares does that work, so your team does not have to scrub records first.
Your company keeps ownership of its data. The license is bounded to defined material and a defined use.
Polyshares is the buyer and pays your company directly. There is no fee or commission, and Polyshares reviews the record before it makes any offer.
Common questions about MongoDB data.
Why is storageSize smaller than dataSize?
WiredTiger compresses data on disk. dataSize is the uncompressed size of your documents, while storageSize is the compressed space allocated to them, including free space.
Should I use mongodump or mongoexport?
Use mongodump for a complete copy. It preserves BSON types and records index definitions. mongoexport writes JSON or CSV and can lose type information.
Does deleting documents lower the size I report?
dataSize goes down when documents are removed. storageSize does not, because the space stays allocated to the collection.
Source: MongoDB Manual: dbStats, MongoDB Database Tools: mongodump, MongoDB Atlas: Review available metrics. Checked September 2026.
Related
- PostgreSQLDatabase and table sizes from SQL, full export with pg_dump and pg_dumpall
- MySQLSum data_length plus index_length from information_schema, export with mysqldump
- BigQueryTABLE_STORAGE logical bytes for size, EXPORT DATA or bq extract to Cloud Storage
- SnowflakeCost management and TABLE_STORAGE_METRICS for size, COPY INTO a stage to export
- Amazon S3Storage Lens and BucketSizeBytes for size, aws s3 sync or Batch Operations to export
- Amazon RedshiftSVV_TABLE_INFO size in 1 MB blocks, UNLOAD to Amazon S3 as Parquet
- DatabricksDESCRIBE DETAIL sizeInBytes per Delta table, export by cloning to your cloud storage
- Amazon DynamoDBItem count and table size per table, export to Amazon S3 with PITR turned on
- All data source guidesEvery system on the Polyshares intake, grouped by category.
Put your numbers on the intake.
List your systems, their sizes and your headcount in one intake. Polyshares reviews the record and prices it. There is no fee or commission to your company.
Check your data