Manual backup using install.sh script not working

Hi,

Thanks in advance.

Tried to upgrade the software/firmware on the emonPi over the router/web interface (local 192.168.1.52) but this caused the installation to brick.

I have a backup.

I wanted to use the same SD card to flash a fresh installation.
This means I dont have an old version for ímportfromsdcard to restore a backup.
I cannot restore an archive/backup over the web interface because I think the files are too big. (at least nothing happens when I try)
My last option is a manual backup using the backup program on github. However I cannot get the backup install.sh script to run. It fails at the first hurdle because it doesnt know where the openenergymonitor directory is to be found.

I have also tried just copying the files from the backups to sd card direct (without using a script). However, the 11GB data storage partition (on my 16gb card) has www-data as the OWNER so I (as root) dont have write access. Is tit safe to try and change the owner to ROOT so I can manually write files on the partition?

Any help appreciated.

I found this archived post.
https://openenergymonitor.org/forum-archive/node/11843.html

I can now use chown to change file permissions so I can write to any folder on the sd card. However, I am stumped as to where the emoncms.sql file is meant to be written to.

I must be doing something the wrong way, so maybe a fresh start is best…

I’ve asked for information about which files comprise the data that must be backed up and restored, and their locations, and the answer - or rather the non-answer - was “there’s a script to do that”.

In the absence of someone who knows, all I can suggest is you find “the script” and pick it apart to find the locations from that. Don’t search the archive, or look at anything more than a year or so old, because I know that emonCMS was restructured with the last major release, and many file locations changed.

Thanks for the reply and the warning.

I have looked at the (install.sh) script but it’s just too much for me to get my head around.

I know where the main data files are located - this is not a problem. But the metadata (feed interval, start time for the PHPFINA, etc used to be in a MySQL database - where that is/was I don’t know; but worse, I have a feeling that’s no longer the case. Hence my caution.
“The Script” I had in mind would be the backup/restore one, not the one for the main installation.