LCD Screen says "Updating - Do Not Unplug" (updating system from V8.5)

Yes that image is too old to update - too much has changed. Your only option is to export the data, create a new image (new SD Card recommended - or buy one from the shop preloaded) and then import your data.

HTH

Thanks - I’ll try this over the weekend. Looking through the guides, I’m trying to find the best way to do a backup on v8.5 so I can restore to a new image, but the guide i can find says to update the image before backing up, which I can’t do:

Is there another guide somewhere showing the best way to backup an old image, which I can then restore to a new one?

Mark

Firstly I’d suggest using a new SD Card - they do have a limited life and it gives you a roll back position (i.e. just put the old card back).

Secondly, I would do a manual backup rather than trying to install the module on an old system.

You don’t need to backup everything, just the data.

However, there were some changes to the data format around that time that required a transformation script to be run IIRC. @glyn.hudson @TrystanLea can you help?

So, I’ve got a new microSD card with the Oct 2018 stable image written to it. I haven’t yet booted it, but will do that tomorrow and expand the data partition.

I’ve not managed to get a backup of my data though - I’ve copied the backup files to a folder on the emonPi, made the script executable, configured the “config.cfg” file (not 100% sure it’s correct though) and tried to run the backup - but I get the following…

Thanks,
Mark

pi@emonpi:~/backup$ ./emoncms-export.sh
=== Emoncms export start ===
Fri Oct 18 23:34:32 UTC 2019
Backup module version:
    "version"      : "2.1.4"
EUID: 1000
Reading ./config.cfg....
Location of databases: /home/pi/data
Location of emonhub.conf: /home/pi/data
Location of Emoncms: /var/www/emoncms
Backup destination: /home/pi/backup/
emoncms backup module location /var/www/emoncms/Modules/backup
Image version: emonSD-17Jun2015
Log is turned off
Stopping feedwriter:  (feedwriter.php was not running...)
stopped
PHP Notice:  Undefined variable: settings in /home/pi/backup/get_emoncms_mysql_auth.php on line 31
PHP Notice:  Undefined variable: settings in /home/pi/backup/get_emoncms_mysql_auth.php on line 31
PHP Notice:  Undefined variable: settings in /home/pi/backup/get_emoncms_mysql_auth.php on line 31
Error: Cannot read MYSQL authentication details from Emoncms settings.php

In the backup folder, can you do a

git describe --debug --tags
git status

from the backup folder please.

and post the config.cfg

Cheers

OK so I know why. The way settings are processed has changed. I have raised a PR #48

go back to the old version of backup by

git checkout 1.2.0

and try again.

This is proving somewhat more successful, the backup script kicked off fine when using 1.2.0, however I’ve now hit a disk space issue on the root partition. Just doing a clone of the SD card in case I break anything, and will then look at either changing the backup location or expanding the root partition (though that looks like it requires a few steps). I’ll report back this afternoon.

use

du -a / | sort -n -r | head -n 20

to find the largest files (probably logs)

To make the files smaller (deleting them can be a bad idea) use

truncate -s 0 /var/log/<log file>

HTH

Problem solved, it was an error in my config where I was putting the backup in /home/pi/backup. Moved it to /home/pi/data/backup and it has now completed successfully. Now to boot the new image and try an import.

I assume I should be safe to use the 2.0.0 backup script to import the data on the new image, or should I stick to 1.2.0?

It will be a different version I suspect.

Just get EmonCMS fully up to date and then do the import. Remeber once you import you need to use the original account info to log in.

You may find an oddity with the dashboards…

Oh and be patient…

Take a while to do all it’s bits first time.

Will do - many thanks for all the help, I’ll update once complete.

Hi,
I now have a new installation fully updated and ready to go. I’ve ensured it is updated, and have imported the backup through the web interface import utility. It appeared to progress well untilI got the following errors:

emonPi%20Import%20Error
emonPi%20Import%20Error%202

I also get an error on the Web GUI:
**Notice** : Trying to get property of non-object in **/var/www/emoncms/Theme/basic/menu_view.php** on line **144**

Also:
Database error, you may need to run database update

I’ve seen reports of this last error and the requirement to do a manual database update using the PHP script described here, however the script doesn’t appear to be available in that folder:

Any thoughts as to the next steps?

Found that the emoncmsdbupdate.php script is now in the update folder…

You should just be able to do it from the admin screen.

What page was this on?

The errors were pop-ups in Chrome, whilst importing the data through the GUI.

When selecting “Graphs” on the left, I still get a pop-up error in Chrome:

image

Incidentally, the data is imported (though I don’t know if it was a clean import) - I can see the graphs with my old data, but can’t currently see how to get new data logging to the old dataset.

Does the error go when you select ‘graphs’ or does it persist? Try changing something on the graphs, add a feed and then delete it and so you can save the graph.

Your data sources should just appear in the Inputs page. Does it?

Can you PM me your settings.php please?

The error persists, each time you re-select the “Graphs” menu at the left.

In my inputs page, I had 3 things listed, all called “emo”, as if it was truncated. It looks like one of them is the emonpi, the other two are emonth sensors. I can select them to initialise them, but can’t see any data. As it stands, I should have 2x wired dallas sensors, 2x TH RF sensors, AC mains sensor, current clamp, etc.

The graphs are all in an “undefined” submenu, and where it has created new graphs for the emonpi (by initialising it), the drop-down to select a graph (under MyGraphs) is completely empty.