Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.0.1 (build 4023) - 16 May 2024

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

Cumulus MX Update Helper Script

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

Post Reply
User avatar
radilly
Posts: 123
Joined: Fri 17 Jul 2015 11:01 am
Weather Station: Ambient WS-2080
Operating System: Raspberry Pi 3, OS Buster Lite
Location: McMurray, PA, US
Contact:

Cumulus MX Update Helper Script

Post by radilly »

I see the topic of updating to the latest version of CMX mentioned through the fora, and having allowed myself to get way behind at one point I'm determined to try staying current. To that end I've been working on a script to help me understand the differences between 2 versions of CMX, and look for any files that I've modified and that require special handling.

I've never shared anything through github, but I believe it is accessible at https://github.com/radilly/cmxaux/blob/master/walker.py

I've used it a couple times now and at this point it saves me time and allows for the style of update I prefer. I understand the recommendation in viewtopic.php?p=148477 - but I'm not sure that preserves any changes I've made or the data collected to date 1. I guess I also like to minimize the down time (from having worked on "live" systems in the course of my career).

This is a Python script, which is easy for Pi users. Though I installed Python on my Windows box some time ago, it is version 3 and runs the script properly in my testing. (I wrap it in a BAT file that has the path to Python.)

The default output is a text report (sample attached) which compares 3 directory trees. The help shown with -h:

Code: Select all

$ ~/cmxaux/walker.py -h
usage: walker.py [-h] [--script {dos,bash}] refdir newdir install

This assists in updating an existing Cumulus MX installation.

positional arguments:
  refdir               Path to the directory we will use as the reference
                       version; the installed version as-shipped.
  newdir               Path to the directory with the new version.
  install              Path to the installed directory which is to be updated
                       (from the version in refdir).

optional arguments:
  -h, --help           show this help message and exit
  --script {dos,bash}  Generate output in script format.
refdir may seem like an odd thing, but it's required to figure out if any files have been changed in your installation - changes you likely want to preserve.

The way I use this is I run a report just to get a feel for the magnitude of the changes between builds. Then I use the --script flag to generate a bash script to copy (and remove) files into my install. The intent is that the generated script represents the minimum change to an existing install. I strongly recommend checking the generated script before running it and, of course, backing up your installation. I generate this script before stopping CMX and get it ready to run, look over the couple of changed files I have to understand what I have to do to bring them up to date, and make my backup. It's then pretty quick to halt CMX, run the script, and restart again. I was down for a minute ... save for the html file changes I need make.

Hopefully that is enough for anyone interested to try it out. This isn't intended to be a "turn-key" updater, but rather something to aid if you wish to do this particular style of update.

---
Edits:

1 "Data" is not an issue. AFAIK, the data files, including .ini files are generated, and not included in the distro. You do need to be mindful of anything you've changed though.
You do not have the required permissions to view the files attached to this post.
Cheers,
Bob
User avatar
radilly
Posts: 123
Joined: Fri 17 Jul 2015 11:01 am
Weather Station: Ambient WS-2080
Operating System: Raspberry Pi 3, OS Buster Lite
Location: McMurray, PA, US
Contact:

Re: Cumulus MX Update Helper Script

Post by radilly »

Build 3099 vs 3100 Results

Occurred to me the third directory (the installation) could be optional. To compare 2 releases I "cheat" and effectively tell the script the install is exactly (the same as) the reference version.

Code: Select all

$ ~/cmxaux/walker.py CumulusMXDist3099 CumulusMXDist3100 CumulusMXDist3099
 . . . . . .
INFO: Files changed between refdir and newdir = 31
INFO: These *potentially* might be replaced in install. Check for WARNINGs.
          web/historicT.htm
          web/trendsT.htm
          interface/lib/editablegrid/editablegrid.css
          interface/lib/editablegrid/editablegrid_utils.js
          interface/lib/editablegrid/editablegrid_renderers.js
          interface/lib/editablegrid/editablegrid.js
          interface/lib/editablegrid/editablegrid_charts.js
          interface/lib/editablegrid/editablegrid_editors.js
          interface/js/extrasensors.js
          interface/js/chartshistoric.js
          interface/js/extradatalogs.js
          interface/js/charts.js
          interface/js/extrawebfiles.js
          interface/json/ExtraSensorSchema.json
          interface/json/StationOptions.json
          interface/json/ExtraSensorOptions.json
          interface/json/NoaaOptions.json
          interface/json/NoaaSchema.json
          interface/json/StationSchema.json
          interface/json/InternetOptions.json
          interface/extradatalogs.html
          interface/extra.html
          webfiles/js/cumuluscharts.js
          webfiles/js/historiccharts.js
          mqtt/IntervalTemplate.txt
          CumulusMX.exe.config
          samplestrings.ini
          Extrafileheader.txt
          Renci.SshNet.dll
          Updates.txt
          CumulusMX.exe
Cheers,
Bob
Post Reply