My data is returned to previous state

Hi
i have database mongodb with nodje js mongoose, suddly my data has become in previous state i have lost some columns create via nodejs, my code nodejs is same no change bu data have changed to previous state any way to recover data as my code node js.
is it a bug or what?
thanks

That does seem “strange”, could you upload the code somewhere to look over it? Could it be the code was inserting default data?

What environment are you running against? Is it a local instance, or a docker instance or an Atlas instance (and if so, what tier)?

John

Hi and thanks for reply
yes i very very strange i got this twice or three, i dont know why, i have a programme angular mean stack, mongoose installed in node js express, the programme keep the same but data return to previous state and i lost change i must recreate them in mongodb shell (can i force schema from node to mongodb?)
the env is windows 11,all in local machine, mongodb compass community.
thanks for your help

sorry i have logs can i restore data from logs?
thanks

1 Like

thanks for your help i found my problem it was service mongodb off, i shutdown all mongod, mongodb compass and restart service from windows service.msc it work finally with my recent data (bizzard!!!).
thanks

So you had multiple servers running one of which had the new data and one the old?

no i have one only and localy