0

I have mongodb backup files as in.wt and.bson and some wieldtrigger files. I have installed mongodb on a new server and copied backed up files to /var/lib/mongo folder and restarted the mongodb service. It is not showing any DB's in MongoDB Compass. When I copied, the original files were overwritten. I also tried with the below command but no luck.

mongorestore -d dbname--c collection /var/lib/mongo/storage.bson""

Please help with how to restore the DB's and collections on a new server.

When I change /etc/mongod.conf bind ip from 127.0.0.1 to 0.0.0.0 and save. After starting the service, it fails to start and the error is "child processes exited 100."

11
  • 1
    Did you backup all files from dbPath folder? Jun 3 at 21:17
  • Yes, I have backed up.
    – NGK
    Jun 5 at 2:12
  • 1
    Then simply copy all files into dbPath and restart the MongoDB Jun 5 at 13:41
  • Yes i tried, but its overwriting already existed files of mongo db. I have path /varl/lib/mongo and no folder like dbPath.
    – NGK
    Jun 6 at 3:28
  • dbPath is the parameter in the configuration file where data is stored (most likely /var/lib/mongo in your case) How do you start the service? Did you empty the existing folder before you copy the files from backup? Did you stop the mongod before? Jun 6 at 6:31

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.