Sample Header Ad - 728x90

How to transfer precomputed mogodb index to another machine?

0 votes
1 answer
39 views
I have a local mongodb database that i want to transfer to a free tier aws ec2 t3.micro instance. The problem is that one collection in the db is a bit larger(1.2 GB, 24M docs), so there is no way i can index it locally on the dinky little aws machine. **I have the storage space but don't have the compute (ram and cpu) to create a index.** I tried transfering db with indexes via **mongodump** and **mongorestore**, but it doesn't look like it actually transfers precomputed indexes. mongorestore hangs the entire ssh session when restoring the particular large index (waited for hours)
2024-06-10T23:27:39.102+0300	index: &idx.IndexDocument{Options:primitive.M{"name":"symbol_1_date_1", "v":2}, Key:primitive.D{primitive.E{Key:"symbol", Value:1}, primitive.E{Key:"date", Value:1}}, PartialFilterExpression:primitive.D(nil)} <-- hangs on this
Asked by dumb_dumb_man
Jun 11, 2024, 01:39 AM
Last activity: Aug 13, 2024, 04:53 PM