zubinmehta
zubinmehta

Reputation: 4533

MongoDB db files movement

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?

Upvotes: 1

Views: 200

Answers (1)

EhevuTov
EhevuTov

Reputation: 20463

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

Upvotes: 1

Related Questions