How to transfer a specific collection from development DB to production DB

I just want to do a one-time transfer. If I have to copy and paste it manually, as long as it works I’m good.

My production server is running in Galaxy.

Galaxy does not host your DB so you’ll need to copy your data to a mongDB host. e.g. Compose.

There is no command (that i’m aware of) to transfer data from one collection to another however I had to do this recently and simply did a ‘mongodump’ and ‘mongorestore’. Give that a google and i’m sure you’ll fin ample resources.

Ash.

Should have clarified. I’m hosting on mLab, I mentioned Galaxy to signify that I don’t have terminal access.

How big is the collection?

If not too big.

Can you entered it like when creating dummy data? When starting up the server, check the db first if the data is there already and then as many collection.updates as documents need to be inserted.

Next time you deploy will fill up the db.


Connect to both your databases, then you can just right click copy+paste collections, and lots of other features.

1 Like