Ylianst / MeshCentral

A complete web-based remote monitoring and management web site. Once setup you can install agents and perform remote desktop session to devices on the local network or over the Internet.
https://meshcentral.com
Apache License 2.0
3.67k stars 511 forks source link

Added DBEncryption - lost a group & devices #6145

Closed dineshmhrjn closed 3 weeks ago

dineshmhrjn commented 1 month ago

Issue similar to #1714:

In config.json, I added: "DbRecordsEncryptKey": "MyReallySecretPassword" and then ran: node node_modules/meshcentral --recordencryptionrecode It successfully encrypted the data, but groups and devices are not showing. However, in the "My Server" tab, it shows "Device Groups: 1" and data in MongoDB.

MeshCentral version: 1.1.22 Monogdb version : 7.0.9

si458 commented 1 month ago

You didn't fill out the bug template report correctly. It has information we need to fix ur issue!

Have u tried restoring an old backup, then upgrading to 1.1.24 and then encrypting?

Did u make sure u Stop meshcentral BEFORE u encrypted the database?

Can u share ur config.json?

Was u using mongodb before u entered the dbencryption?

Was u using nedb then changed ur config.json to use mongodb with dbencryption?

dineshmhrjn commented 3 weeks ago

I did some silly mistake with configuration. It is sorted now. Thank you.

si458 commented 3 weeks ago

Care to share with the community/others in case they have the same issue?

dineshmhrjn commented 3 weeks ago

Sure, MongoDB was installed on another VM in Docker. I mounted a new disk for the Docker volume but was not aware that it was in /tmp. So, every time the server (localhost) restarted, all the databases were gone.