A long time ago my emonPi took an update and on reboot it showed “Updating - Do Not Unplug” on the screen. It stayed displaying this indefinitely, and eventually after a reboot it came back to the same screen. The emonPi appears to be working ok, I can SSH to it and connect to it via the Web UI, and the sensors continue to update. However I’m not able to update to a later version, add any sensors, etc.
I’ve tried restarting the emonPiLCD service which claims to work, but doesn’t do anything. Any suggestions what options there are to get it back up and running?
Just to add some info, it’s a very old image (emonSD-17Jun2015). When trying to force an update, I get the following from the log:
Stopping system emonPiLCD daemon:start-stop-daemon: warning: failed to kill 2306: No such process
No process in pidfile ‘/var/run/emonPiLCD.pid’ found running; none killed.
failed!
I2C LCD DETECTED Ox27
Starting emonPi Update >
via update
Wed Oct 16 22:16:02 UTC 2019
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.
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?
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
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.
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?
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:
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:
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.