Вопрос

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