Start a Conversation

Solved!

Go to Solution

1580

May 21st, 2020 03:00

WMS 2.0 mongodb backup

Trying to backup the mongodb.. i use the commands mongodump --host 127.0.0.1 -u "user" –p "password" --authenticationDatabase admin --db stratus --out ".\wmsmongodump" and keep getting errors.. 

error: failed: error writing data for collection 'stratus.events' to disk: error reading collection: failed to parse: {find: "events", skip: 0, snapshot: true, $readpreference: {mode: "secondartPreferred"}, $db: "stratus"}. Unrecognized field 'snapshot'.

i know the username and password are correct as i can log into the db using it. 

3 Apprentice

 • 

741 Posts

May 21st, 2020 08:00

Adding --forcetablescan to the end of the statement enabled a successful backup for me. 

 

mongodump -ustratus -pmysupersecretpassword --authenticationDatabase admin --db stratus --out C:\temp m--forcetablescan

3 Apprentice

 • 

741 Posts

May 21st, 2020 06:00

I can confirm i am seeing the same with 2.0

mongodump -ustratus -pmysupersecretpassword --authenticationDatabase admin --db stratus --out C:\temp

I get the same error, but I also can see that it is backing up some other items.  I have not tried restoring yet to see if restores all, but the events table, and what the effect is. 

I will look into it.  Personally my preference is not to rely on native DB tools, but to rely on taking a Hypervisor based backup with the server offline occasionally.

 

No Events found!

Top