Mongodump bad dumping

mongodump fail to dump correctly two collections that differ only by casing of their names.
I use mongodump on Windows.
In my data base there are two collections: ‘ai_patients’ and ‘ai_Patients’.
They differ by the ‘p’ and ‘P’ in their names.
vlanalyticsApp> db.ai_Patients.countDocuments()
4481
vlanalyticsApp> db.ai_patients.countDocuments()
0

After dumping the database only two files are created: ‘ai_Patients.bson’ and ‘ai_patients.metadata.json’
After restoring the database only the ‘ai_Patients’ collection is created with no documents at all and the ‘ai_Patients’ is not created.

It seems like a bug.

Thanks,
Itzhak

:warning: When dumping to a case-insensitive file system such as Windows or macOS, collections with names that differ only by capitalization will be overwritten. For case-insensitive file systems, always use the –archive option.

2 Likes

Thanks Chris,
It helped a lot.

1 Like