Question

I have a MongoDB instance running but directoryperdb is false. I would like to enable it.

Is it safe to create and change the owner of folders to keep my data by manually, instead of dump and restore?

I tried on a test environment and it seems mongo working without any problem... But I want to be sure that will be good for production too...

Thanks for help, information, and comments.

Was it helpful?

Solution

Yes, that should work just fine - as long as you shutdown MongoDB first before moving files around. If you are using a replica set, then you need to do it one by one, and make sure you follow the rolling "upgrades" procedure — ie, makes sure that a node is a secondary first before shutting it down.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top