Restoring a data dump directory to a new server

Hi ,

I’m kind of new to mongodb as a database administrator and still learning , currently we have a production server and i want to restore the data directory to another server. I already configured the confg file to be pointed on where the data dump is restored.

Upon running im experience a permission denied error on local.ns even though i already set the permission of the files to the correct user.

Do i need to do some configurations before running the instance? Thanks

What version of MongoDB and what OS ?

MongoDB 2.6 , CentOS 7

Wow, that is really old. 2016 end of life old.

If the file ownership is correct then this could be SELinux related.

For RHEL/Centos setting the correct context would be:
restorecon -Rv /var/lib/mongo

Compare with your donor host, SELinux may be set to Permissive or even Disabled.

1 Like

Thanks chris , will try this later and get back to you when its resolved :smiley:

Hi Chris,

Thanks for the help , it already works after setting it to permissive.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.