Nodebb: failed to restore a mongo dump
-
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
-
DownPWreplied to DownPW on 7 Jan 2023, 22:49 Edited 07/01/2023, 22:49 last edited by DownPW 1 Jul 2023, 22:49
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/
-
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (ether email, or push notification). You'll also be able to save bookmarks, use reactions, and upvote to show your appreciation to other community members.
With your input, this post could be even better 💗
RegisterLog in
1/2