سؤال

I am using mongodb and I have changed the dbpath. Can I just copy all the files from the earlier dbpath to the new dbpath?

PS: I have come across the mongodump alternative which might be a bit tedious. So I am interested in knwoing whether plain copying work?

هل كانت مفيدة؟

المحلول

Yes, you can just do a normal copy if you shutdown your mongod first. You don't need to copy mongod.lock.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top