For most updates it’s possible to use the emonCMS update mechanism available in the emonCMS Admin section. This downloads the latest version of emonCMS and all installed modules.
We also periodically release a new emonSD image along with a fully updated version of the base OS and emonCMS software, new images sometimes include more substantial changes to partition and directory structure that are harder to update via the standard update method. We recommend upgrading to new images when they become available to ensure your system is fully up-to-date.
- Login to emonCMS and navigate to Setup > Admin
- Click on dropdown selector next to ‘Full Update’ button to expand all update options.
- To update all components click on ‘Full Update’
- To update specific parts, select as required (The database update is included as part of the full update and emonCMS update).
If the update fails the first time, make a record of the update log and try again. If this does not solve the problem and you would like help to proceed further please let us know on the forums http://community.openenergymonitor.org. Please provide as much information as possible including the update log and Server Information (Click on the button ‘Copy as Markdown’ next to Server Information on the Admin page and paste the result without further formatting in your post).
The most straightforward method of upgrading to a new emonSD image is to start with a new SD card, keep your existing emonPi/emonBase SD card as a backup to which you can revert if needed and then plug the old SD card into the emonPi/emonBase using a USB SD card reader and import the data directly.
For an alternative single SD card upgrade method see the export/import archive method covered here: Guide: Backup.
1. Prepare a new card
It is a good idea to start with a new SD Card to minimise risk of disk errors from previous use, though reuse should also be fine if lightly used. A 16Gb card should suffice; emonCMS is very efficient in the way it stores it’s data.
There are 2 options for a new card:
- Purchase a new card with the image pre-installed, from the OEM Store.
- Burn/flash a new image to an SD Card. To do this:
2. Initial boot
- Shutdown your existing system by clicking on Shutdown on the emonCMS Admin page, after 30s remove the USB power cable to fully power down.
- Remove your existing SD card (you will need this SD card again in a moment).
- Insert the new SD card & power up the device. Then wait, wait, wait, make a cup of coffee, wait, wait, wait… (lots of updates etc) - really do not rush this part it does take a while.
- If you do not have a wired Ethernet connection you will need to setup your WiFi. Note the updates will not happen until after you have connected the Pi to the Internet.
Once the initial update and setup is complete, you can proceed to import your data.
3. Restoring your system
- Place the old SD card in an SD card reader and plug into any of the USB ports on the emonPi/emonBase running the new image.
- From the emonCMS login page, click register and create a temporary user. Once the import is complete the original user details will be used.
- Navigate to Setup > Backup
Import from USB driveto start import process
- Once the import is complete, log out and back into the emonCMS page with the original user details