Category5.TV Community Forum

Full Version: Remote DB?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,

Just installed NEMS last night and been playing around with it today. However, I was wondering if there's a supported method to offload the database to a remote server? I've got a NAS that can run mysql (QNAP) across a RAID 10 rather than having the DB burn out a microSD card. Anyone know if this is possible?
How advanced are your Linux skills? It'd be easy to stop the MySQL process, migrate the data, then change the MySQL storage folder to a mountpoint and set it up over SMB before re-enabling the service. Or you could hack up the configs to point to a different MySQL server.

But it's kind of pointless (and obviously unsupported). The database is not written to when NEMS is operating, and even when it is (when you're configuring services) it's very minor. So to move the MySQL database would only be an experiment just for fun -- like building a mining cluster out of Raspberry Pi's -- absolutely no point in doing it, but it's fun to do.

(01-01-2019, 08:06 PM)Robbie Ferguson Wrote: [ -> ]The database is not written to when NEMS is operating

Thanks Robbie! So I may have been mistaken then on my understanding of how NEMS operates. If the DB isn't experiencing constant IO during operation, then I don't need to worry about SD burnout, which is really the only reason I'd want to move the DB. Are there any log files/historical tracking that I need to be concerned about/possibly move to a remote mount? Just trying to make sure that I don't go through setting this all up to just have it chew through the SD card and die.

Thanks again!
In building NEMS Linux, this was also a concern of mine, which I've been addressing more and more with every major release.

As of current, NEMS utilizes temporary storage in ZRAM (compressed space within your RAM modules) to reduce wear-and-tear on SD Cards. It goes without saying therefore that SBCs with more RAM will outperform and outlast those with less. I prefer boards with 2-4 GB RAM (eg., ODROID XU4 or the PINE64 lineup).

NEMS also provides a full backup for you should your card expire, and I suggest automating the storage of that backup.

If you sign up for NEMS Cloud Services you will also receive off-site backup and restore functionality, plus NEMS will even notify you if your server stops responding (ie., SD card dies).

NEMS 1.6 will introduce external storage options, including NAS, SSD, etc. but that's probably 6 months off (or so).