Skip to content

Updating with new SD Card

Brian Orpin edited this page Dec 22, 2019 · 4 revisions

Draft guide started 18/12/19 BPO

Update your EmonCMS Install

With the recent significant changes to the way EmonCMS is installed, the directory structure used and the implementation of the underlying services, problems with updating the software in place are quite common.

The aim of this guide is to help users start with a fresh SD Card and import their data into a new installation.

The guide is aimed at anyone currently using the EmonSD image. The data import will work for all installations. For alternative install routes review the EmonScripts documentation.

Prepare a new card

It is always a good idea to start with a new SD Card. A 16Gb card should suffice; EmonCMS is very efficient in the way it stores it's data. The added benefit of a new card is that you have a way back to how it was before!

There are 2 options for a new card;

  1. Purchase a new card with the image preinstalled, from the OEM Store.
  2. Burn/flash a new image to an SD Card. To do this:
    1. Download image from the Release Page.
    2. Follow the guide on the Raspbian docs to flash the image. This covers a method for most OSs.

Keeping your data

Before you close down your current installation (you will get a small gap in your data), try and create a backup file using the EmonCMS backup module installed on many systems and available from the Web interface. If this fails, it is possible to install the backup module and run it manually (todo). Ther is a third method and that is to import the data directly from the old SD card. This can also be attempted where there has been a corruption of the SD Card (though success is not guaranteed.

Initial boot

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.

Restoring your system

If the earlier backup was successful, this is the easiest route to restore your system.

  1. At the web interface, register as a new user.
    1. Navigate to Backup & import backup file
    2. or Import from USB.
  2. Log in with the original user credentials