-
Notifications
You must be signed in to change notification settings - Fork 563
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MongoDB or NeDB #2945
Comments
MongoDB is good while compare with other DB's. |
Thanks for that. |
NeDB is suggested for small organizations having agents less than 500. |
Exactly right. If your using MeshCentral in production or for anything critical, I highly recommend using MongoDB. NeDB has not been updated in a long time and MongoDB is much more professional. |
Ok, I will then deploy it with MongoDB community edition from the start, this way the platform is ready from the start. |
MySQL should work fine now. We just convert MongoDB calls into SQL calls and it seems to work well. One benefit of MongoDB is that MeshCentral is capable of "bulk reads" and "bulk write" into MongoDB. You need to add the following line in the settings section of the config.json:
This should boots server scaling quite a lot. For MSSQL, I am not opposed to supporting it at some point, however it's a licensed database with added costs to run and not sure how many in the community would use it. |
So true Licencing is bomb. |
I do not believe you have to manually create the database if you are using mongodb. It has been a while since I have installed it on Windows. However, if you prefer MySQL / MariaDB, I have worked a lot on it and it is currently at feature parity with MongoDB. You do have to first create a user+database (or use the root user to create the db automatically). The config.json looks like
Note that when you set up a MySQL server in particular, you have to enable Legacy Authentication. This is a limitation of the nodejs mysql connector (mysqljs/mysql#2002 , mysqljs/mysql#2233). There are ssl options though, you can find them in https://github.com/Ylianst/MeshCentral/blob/master/meshcentral-config-schema.json PS: I can look at adding MSSQL support, but I don't think this will happen soon. As far as I'm aware, you are the first person to ask for it. I think you would be the only one to use it. |
This project is awesome and has such great potential. |
If you are referring to Regarding your server warning, meshcentral has not found the path to mongodump. You need to include the following option in your config.json:
Make sure you use the actual file path to where mongodump is on your system. The double \ is also needed. |
Can you post your config.json. I'll let you know if there are any issues. |
I have spotted the issue. The "MongoDumpPath" option cannot be put at the root level. It must be inside "AutoBackup" In your instance, this would look like
|
Nzalev you the best awesome fix |
Help with Meshcentral MongoDb Ubuntu Backup Option guys please can you help i have installed the Latest Meshcentral version v.0.8.98 on a Ubuntu 20.4 Server I need help with the following: Under Server Actions I DO NOT have the Following Options: when i do " whereis mongodump " i get = mongodump: /usr/bin/mongodump /usr/share/man/man1/mongodump.1.gz my Meshcentral files are in " /opt/meshcentral " i need to understand what i need to enter in my " config.json " file so that i get the Available Server Actions to make mongodb backups? when i enter the following in my " config.json " file "AutoBackup": { it still does NOT give me the Server actions to make backups or restore any help greatly appreciated |
Thank you that worked my question is Under Server Actions I DO NOT have the Following Options: How do i get the two options under " Server Actions " ? |
Again, |
Is there a possibility to transition the existing setup (which is the default one out of the box) to the MongoDB? Quite a bunch of stuff already implemented that I don't want to lose. |
Quick question for @nzalev: I just successfully migrated over to MySQL (using Mongo before but I run a central MySQL server for a bunch of other projects and wanted to consolidate if possible). Everything seems to be working great after finding your config example but I'm now getting a warning about being unable to find mysqldump every time I start the server and on the server info page. Is there a way to tell MeshCentral to ignore this if you are running the MySQL instance on a different server? |
@PetieM Meshcentral uses mysqldump or mongodump to include the database in its automatic backups. In either case, when the database server is remote, meshcentral still needs access to the dump commands or else it will produce this warning. I don't know off-hand if there is a way to disable that warning but I can get back to you on that later today. Are you creating DB dumps at the remote server instead? |
I am creating dumps on the remote server but went ahead and installed the MySQL client applications on my MeshCentral server as well. I figure more backups is never a bad thing. It's installed and still telling me it can't find mysqldump though. Do I need to specify its path somewhere? |
Generally, if you are on Windows you have to specify the path, but usually not on linux. Continuing from my MySQL example above: "settings": {
"wanonly": true,
"mysql": {
"host": "localhost",
"user": "meshcentral",
"port": 3306,
"password": "meshcpassword",
"database": "meshcentraldbname"
},
"AutoBackup": {
"mysqlDumpPath": "C:\\Program Files\\...\\mysqldump.exe"
},
... If you are using windows, the double backslashes in the string are required. If you are using linux, the path is usually I don't know the path that it is usually installed to on Windows. |
I'm on CentOS 8 at the moment and it's running just fine (though I'm getting permission errors that I'll need to fix as it seems to be trying to access data outside of the meshcentral database) when I manually execute autobackup but still warns that it can't be found. Should I specify the path anyway or is there something else going on here? |
You should run
and then fill in
Quick edit:
You can also try running mysqldump with these parameters (the user/pw/host/port/dbname all from your config.json) and see if it fails (and why). This error is actually generic and is used for all error conditions. This is true for both mysql and mongodb. If adding the path manually does not fix it, you can modify line 1835 of db.js from func(1, "Unable to find mysqldump, MySQL/MariaDB database auto-backup will not be performed."); to func(1, "Unable to find mysqldump, MySQL/MariaDB database auto-backup will not be performed." + error); If you're not comfortable with that, I can put in a PR with an update to the error reporting, but I don't know when Ylian is going to be fully back online to accept the pull. |
Okay, it looks like it's finding it but there are a couple of components to the error it's throwing. See below:
So it seems related to the fact that it's executing with a password on the command line? On top of that though, it seems to want to select from information_schema which shouldn't be needed if you're just dumping the one database. And --no-tablespaces should probably be added to the command to prevent needing to give the user account the global "PROCESS" privilege. |
I have looked at adding no-tablespaces before, I am not sure why I did not add it. To solve your issue though, can you create the file
|
Adding that to my.cnf seems to have resolved all of this in one go - I'm no longer getting an access denied message even without --no-tablespaces so it looks like that's not needed after all. Thank you for the extremely responsive help today! |
Hi Ylian,
Been following your project for some time and have been using it internally on the standard DB.
I'm going to implement a Live environment on WAN.
Which database would you suggest I use moving forward NeDB ro MongoDB and if MongoDB and what version community
or enterprise
Ill have 100-200 endpoints.
it will run on server 2019 Standard.
The text was updated successfully, but these errors were encountered: