A few months ago, I had an active MongoDB database, but for other reasons, I had to terminate it. However, it was a Dedicated tier db so I was able to take an Atlas snapshot of everything inside before it was deleted. The Atlas snapshot gave me a compressed .tar.gz with a restore folder that contained various collection and index .wt files.
Fast forward to now, I’m hoping to be able to access the information within these files for a project I want to do, but I’m incredibly inexperienced with Mongo. Does anyone know how I can access the data within these .wt files without deploying a paid Atlas cluster?
I tried the following:
Copy and pasting all the .wt files into my local dbPath
Starting mongod
Running mongodump --out /path/to/output/directory to get .BSON version of the .wt files
This sort of worked, but all I got was a single folder titled ‘admin’ that had two .BSON files in it:
system.version.bson
system.version.metadata.json
I would greatly appreciate any help! Thank you so much.
Sounds like most of the steps are fine. You don’t necessarily have to copy and paste all the .wt files into your local dbPath. Have you tried starting the mongod instance using the extracted data file directory instead? Example detailed in step 4 of the Restore from a Locally-Downloaded Snapshot documentation.
I can’t recall any quick way off the top of my head. Perhaps you can log into your Atlas account and check the project activity feed to see what was the last version of your cluster.
I don’t believe thats a direct indicator of what version was downloaded from your Atlas cluster. You can try a few out and let me know how you go (for e.g. starting with version 4.2 mongod and trying versions before and after).
I tried every available version of MongoDB from 3.6.23 to 5.0.18, but all of them gave me errors. 4.2.24, which was the closest thing to the version I suspected I needed (4.2.23), was available and even that didn’t work.
However, I was so desperate that I ended up going on a whim and editing the download link so that it was representative of 4.2.23. I didn’t expect much, but that actually ended up working! I was able to download and use 4.2.23 mongod.
Tried what I was doing before and the .BSON dump finally executed properly.