Skip to content

Nodebb: failed to restore a mongo dump

Solved Configure
  • hello @phenomlab

    i want to restore my production db mongo backup to my dev environnement

    I have set the same ID/password for mongo admin users, same user for same database name and same password.

    Hhere is the file of the dump

    root@nodebbpwclonedb:/home/nodebb/nodebb_DB_20230107/nodebb# ls -lsah
    total 1,6G
    4,0K drwxr-xr-x 2 nodebb nodebb 4,0K  7 janv. 23:09 .
    4,0K drwxr-xr-x 3 nodebb nodebb 4,0K  7 janv. 23:08 ..
    1,5G -rw-r--r-- 1 nodebb nodebb 1,5G  7 janv. 03:30 objects.bson
    4,0K -rw-r--r-- 1 nodebb nodebb  603  7 janv. 03:30 objects.metadata.json
     18M -rw-r--r-- 1 nodebb nodebb  18M  7 janv. 03:30 searchpost.bson
    4,0K -rw-r--r-- 1 nodebb nodebb  492  7 janv. 03:30 searchpost.metadata.json
    276K -rw-r--r-- 1 nodebb nodebb 275K  7 janv. 03:30 searchtopic.bson
    4,0K -rw-r--r-- 1 nodebb nodebb  493  7 janv. 03:30 searchtopic.metadata.json
       0 -rw-r--r-- 1 nodebb nodebb    0  7 janv. 03:30 sessions.bson
    4,0K -rw-r--r-- 1 nodebb nodebb  314  7 janv. 03:30 sessions.metadata.json
    

    and the command I use for restore with the result :

    nodebb@nodebbpwclonedb:~/nodebb$ sudo mongorestore --username admin --password XXXXXXXXXXXXXXX --nsInclude nodebb.objects --drop /home/nodebb/nodebb_DB_20230107/nodebb/
    [sudo] Mot de passe de nodebb : 
    2023-01-07T23:14:07.617+0100    preparing collections to restore from
    2023-01-07T23:14:07.617+0100    don't know what to do with file "/home/nodebb/nodebb_DB_20230107/nodebb/objects.bson", skipping...
    2023-01-07T23:14:07.617+0100    don't know what to do with file "/home/nodebb/nodebb_DB_20230107/nodebb/objects.metadata.json", skipping...
    2023-01-07T23:14:07.617+0100    don't know what to do with file "/home/nodebb/nodebb_DB_20230107/nodebb/searchpost.bson", skipping...
    2023-01-07T23:14:07.617+0100    don't know what to do with file "/home/nodebb/nodebb_DB_20230107/nodebb/searchpost.metadata.json", skipping...
    2023-01-07T23:14:07.617+0100    don't know what to do with file "/home/nodebb/nodebb_DB_20230107/nodebb/searchtopic.bson", skipping...
    2023-01-07T23:14:07.617+0100    don't know what to do with file "/home/nodebb/nodebb_DB_20230107/nodebb/searchtopic.metadata.json", skipping...
    2023-01-07T23:14:07.617+0100    don't know what to do with file "/home/nodebb/nodebb_DB_20230107/nodebb/sessions.bson", skipping...
    2023-01-07T23:14:07.617+0100    don't know what to do with file "/home/nodebb/nodebb_DB_20230107/nodebb/sessions.metadata.json", skipping...
    2023-01-07T23:14:07.617+0100    0 document(s) restored successfully. 0 document(s) failed to restore.
    

    grrrrrrr

  • @phenomlab

    In fact I specified the sub rep and not the rep

    DON’T DO THIS:

    nodebb@nodebbpwclonedb:~/nodebb$ sudo mongorestore --username admin --password XXXXXXXXXXXXXX --nsInclude nodebb.objects --drop /home/nodebb/nodebb_DB_20230107/nodebb/
    

    BUT THIS :

    nodebb@nodebbpwclonedb:~/nodebb$ sudo mongorestore --username admin --password XXXXXXXXXXXXXX --nsInclude nodebb.objects --drop /home/nodebb/nodebb_DB_20230107/
    

    🙂

  • DownPWundefined DownPW has marked this topic as solved on

Did this solution help you?
Did you find the suggested solution useful? Why not buy me a coffee? It's a nice gesture, and a great way to show your appreciation 💗

  • 13 Votes
    27 Posts
    2k Views

    yuuuuu.png

  • 1 Votes
    3 Posts
    172 Views

    You might want to also review this post

    https://sudonix.org/topic/389/mongodb-backup-script

  • 2 Votes
    11 Posts
    332 Views

    @veronikya said in mongodb replica set:

    The host’s local dns resolution is not configured. The problem of the host’s hosts being unable to be resolved in docker has been solved. Surprisingly
    Solution:
    Edit the /etc/resovel.conf file
    Add 127.0.0.53

    One immediate issue I can think of here is that editing resolv.conf directly is no longer supported and not recommended (because the changes do not survive a reboot) - unless you install the resolvconf package?

  • NodeBB: hCaptcha

    Solved Configure
    15
    2 Votes
    15 Posts
    345 Views

    @mventures none that I know of. I don’t recall selecting these either for mine.

  • NodeBB: Favicon upload issue

    Solved Configure
    12
    3 Votes
    12 Posts
    369 Views

    @phenomlab I am on a Mac, so I used the “Option + Command + I”, and then performed the steps. It loaded my favicon! I checked on Firefox which I haven’t used before, and it showed my favicon also! That’s fantastic and thank you for the help!

  • nodebb loading emojis

    Solved Configure
    16
    1 Votes
    16 Posts
    465 Views

    @DownPW sure. Let me have a look at this in more detail. I know nginx plus has extensive support for this, but it’s not impossible to get somewhere near acceptable with the standard version.

    You might be better off handling this at the Cloudflare level given that it sits in between the requesting client and your server.

  • MailGun Not Working NodeBB

    Solved Configure
    6
    1 Votes
    6 Posts
    249 Views

    @phenomlab did it 🙂 i did not create smtp user on mailgun. everything is working now.

    6cc6061f-ed5d-41f6-8eb7-5d98f98b3706-image.png

  • NodeBB metadata

    Solved Configure
    4
    2 Votes
    4 Posts
    368 Views

    @phenomlab said in NodeBB metadata:

    @jac Are you sure ?

    https://www.google.co.uk/search?q=site%3Astockportcounty.fans&sxsrf=AOaemvLwnaZL-PliU_2dBOg_Eo1pMVhBjg%3A1638982328139&source=hp&ei=uOKwYeatBcOsad3yp7AE&iflsig=ALs-wAMAAAAAYbDwyLBSDcG5XYoFCKwQFhgz94wTxOcV&ved=0ahUKEwjm6dX71NT0AhVDVhoKHV35CUYQ4dUDCAk&uact=5&oq=site%3Astockportcounty.fans&gs_lcp=Cgdnd3Mtd2l6EAM6BAgjECc6CwgAEIAEELEDEIMBOg4ILhCABBCxAxDHARCjAjoRCC4QgAQQsQMQgwEQxwEQowI6BQguEIAEOggIABCABBCxAzoFCAAQgAQ6CAguELEDEIMBOgsILhCABBDHARCvAToICC4QgAQQsQM6BQgAELEDOgsILhCABBDHARDRAzoLCAAQgAQQsQMQyQM6BQgAEJIDUABYySZg0CdoAHAAeACAAW2IAa0NkgEEMjMuMpgBAKABAQ&sclient=gws-wiz

    Fair enough 🤪🤪😁.