I will visit a client's industry location for a few hours and have to copy the data from his mongoDB server. The data is currently above 800gb in size. I tried to replicate the data remotely but it is very slow, and hence I will visit the physical location to clone the data. Few options I found are LVM, mongodump, mongoexport, and until now LVM seems the best option. Is there a js query that can solve this situation or what might be the best course of action for this? Thanks.
Make a mirror partition or disk as a LVM PV (physical volume) and make sure both are in sync. Then just take out one of the disks with you.
Before doing any changes in production, experiment with 2 VMs. One that is the "local VM" and another that is "client VM". Have a disk volume that you detach from the first VM with the mirror, then attach it to the 2nd VM. Document all steps and all troubleshooting steps.
By LVM I mean Linux device mapper based Logical Volume Manager
If the mongodb data is not on LVM, or speed is most important limiting factor and you can take the disks offline, you can:
- stop all services using any partition/volume from the volume you want to mirror
- unmount all partitions from the disk you need to copy or at least the mongodb one
- copy using
dd if=/dev/sdX of=/dev/sdY, where sdX is the source disk and sdY is the destination disk. Make sure you understand the
ddcommand and what a block device is before using it blindly.