Page 1 of 2

Saving CumulusMX Data Files Other Then SD Card

Posted: Sun 20 Dec 2015 4:33 pm
by randy52644
Just got CumulusMX running on a RPi this morning and really like what I see. Now I can shut down that power hungry PC!
But am concerned about writing the data.ini files to the SD card for the next several years. I can't find a setting that allows those .ini files to be sent to other than CumulusMX/data.
I do have a server that could be used but must be over looking the path setting to send the files to that location.

Randy

Re: Saving CumulusMX Data Files Other Then SD Card

Posted: Sun 20 Dec 2015 4:58 pm
by rogerthn

Re: Saving CumulusMX Data Files Other Then SD Card

Posted: Sun 20 Dec 2015 5:07 pm
by steve
randy52644 wrote:I can't find a setting that allows those .ini files to be sent to other than CumulusMX/data.
I do have a server that could be used but must be over looking the path setting to send the files to that location.
That's because there isn't one, all of the data files have to be in the data folder in the Cumulus installation folder. As in the thread that Roger has linked to, if you don't want to use an SD card for Cumulus (and not using one is a very good idea), you will need to install Cumulus to a drive attached to the Pi.

Re: Saving CumulusMX Data Files Other Then SD Card

Posted: Sun 20 Dec 2015 5:12 pm
by steve
Actually, you could probably symlink the data folder to a drive on another machine on the network, if you really wanted (or use it as a mount point, or whatever is the correct thing to do in Linux). But having the data folder on a separate machine sounds to me like a recipe for more problems than the risk of SD card corruption.

Re: Saving CumulusMX Data Files Other Then SD Card

Posted: Sun 20 Dec 2015 7:47 pm
by randy52644
Thank you for the clarification Steve. Since moving from a PC to a RPi, I was hoping to keep my power consumption low. Adding a HD back to the RPi raises that consumption again.
Would mounting a USB flash drive to run MX be better than running from the SD card?

Re: Saving CumulusMX Data Files Other Then SD Card

Posted: Sun 20 Dec 2015 8:11 pm
by steve
I don't whether flash drives are more or less susceptible to failure than SD cards - perhaps someone else will know.

My USB drive is plugged straight into my Pi2, so it can't be using a lot of power.

Re: Saving CumulusMX Data Files Other Then SD Card

Posted: Sun 20 Dec 2015 8:16 pm
by randy52644
Steve, is your USB drive a solid-state type drive or one of those old fashion mechanical type with the spinning disk? :D

Re: Saving CumulusMX Data Files Other Then SD Card

Posted: Sun 20 Dec 2015 8:22 pm
by steve
It's a 2TB Samsung M3 mechanical drive - I imagine a SSD would use even less power.

Re: Saving CumulusMX Data Files Other Then SD Card

Posted: Sun 20 Dec 2015 8:24 pm
by rogerthn
Mine is also "spinning rust" :lol:

Code: Select all

sudo smartctl -a /dev/sda | grep Model
Model Family:     Seagate Momentus 7200.4
Device Model:     ST9250410AS

Re: Saving CumulusMX Data Files Other Then SD Card

Posted: Sun 20 Dec 2015 8:30 pm
by randy52644
Thanks to Steve and all that contributed, I'll explore my storage options. Right now I'm having too much fun with the new format.

The greatest thing I have found with Cumulus and now MX is the outstanding author and community support!
A small token of my appreciation has been sent via Pay Pal. If I hadn't spent so much on my wife for Christmas, Steve would have gotten a little more.

Re: Saving CumulusMX Data Files Other Then SD Card

Posted: Mon 21 Dec 2015 4:34 pm
by thecivvie
Like others, I boot from the Sd card and run of a SSD disc. Basically it is a case of coping everything bar the boot files onto the SSD and editing the stab file. There are some good tutorials on the Pi sites on how to do it. I still back my SD card every now and again.

Re: Saving CumulusMX Data Files Other Then SD Card

Posted: Mon 21 Dec 2015 9:01 pm
by Rayj44
I've also been running CumulusMX on a RPi for several weeks. I've always been concerned about losing all my precious historical data, and previously backed it up regularly from the windows PC.

I pull the data files off the RPi onto my NAS on a regular basis using the Pi rsync server.

Re: Saving CumulusMX Data Files Other Then SD Card

Posted: Mon 21 Dec 2015 9:14 pm
by jank
Hi
I also want to share something regarding this topic
Linux (Debian) is having a build in command to realize such frequent backups.

For example, when you have a USB Stick plugged in and it is mounted into /mnt/usb on your Raspberry Pi
(CumulusMX is still running on a SD Card)

Create a new cronjob with: crontab -e and insert this line

00 */1 * * * sudo rsync -rtagu /home/pi/CumulusMX/ /mnt/usb/CumulusMX_Sync/ --exclude=MXdiags --exclude backup

this command will sync the complete CumulusMX Folder every hour to your USB Stick into the Folder CumulusMX_Sync.
It will not sync any MXDiags.
The advantage of the Rsync command is, only changed data will be synced - this means: it will not backup all files every hour, only the files changes since last rsync.
In case someone feels more secure creating a daily zip backup in addition to this hourly sync, please let me know and I will post the command here.
Alternatively, install the cumulusmx.sh script https://cumulus.hosiene.co.uk/viewtopic.php?f=27&t=13767 and call this script in your crontab with these parameters
59 23 * * * sudo /CumulusMX/cumulusmx.sh -b -z >> /dev/null 2>&1

It will create a daily backup of the CumulusMX folder around midnight and additionally, you can define, how many old backups should remain, for example: 5.
This will delete all Backups older than 5 days
Jan

Re: Saving CumulusMX Data Files Other Then SD Card

Posted: Mon 21 Dec 2015 9:45 pm
by rogerthn
Maybe something like below in /etc/fstab?

Code: Select all

//NAS/Share /NASbackup cifs uid=1000,gid=1000,credentials=/etc/NAScredentials,file_mode=0777,dir_mode=0777 1 3
/etc/NAScredentials should contain

Code: Select all

username=NASuser
password=NASpassw0rd
and it should be owned by root and maybe

Code: Select all

chmod 600 /etc/NAScredentials
Then

Code: Select all

sudo mkdir /NASbackup
sudo mount -a
i.e. you can send your backups to the NAS :mrgreen:

Re: Saving CumulusMX Data Files Other Then SD Card

Posted: Mon 21 Dec 2015 10:09 pm
by jank
rogerthn wrote:Maybe something like below in /etc/fstab?
We are on linux, so we can / should use nfs instead of cifs.....it's easier fomr the syntax

192.168.193.1:/export/Backup /mnt/Backup nfs rsize=1500,wsize=1500,timeo=14,intr 0 0

8-)