Community
OpenEnergyMonitor

Community

Web Based Backup Fails


(Andrew Findlow) #1

I’m trying to backup my local emoncms, I’ve tried web based and get:

So I then tried SSH as per Paul B on the forum with
[email protected](rw):backup$ ./emoncms-export.sh
I get:

[email protected](rw):backup$ ./emoncms-export.sh
=== Emoncms export start ===
Thu 20 Dec 07:12:23 UTC 2018
Backup module version:
    "version"      : "1.1.4"
EUID: 1000
Reading /home/pi/backup/config.cfg....
Location of mysql database: /home/pi/data
Location of emonhub.conf: /home/pi/data
Location of emoncms.conf: /home/pi/data
Location of Emoncms: /var/www/emoncms
Backup destination: /home/pi/data
Image version: emonSD-26Oct17
./emoncms-export.sh: line 74: /home/pi/data/emoncms.sql: Permission denied
Error: failed to export mysql data
emoncms export failed

Nevertheless, the SSH backup works when using
[email protected](rw):backup$ sudo ./emoncms-export.sh
any help appreciated on trying fix web based emoncms backup.


(Glyn Hudson) #2

Hi @andrewhf01

Try updating to the latest version of the backup module, I see your running 1.1.4. The latest version is 1.1.6. It should update if you run emonPi update (Setup > Admin > emonPi update) in local Emoncms

The issue seems to be that the database dump file /home/pi/data/emoncms.sql has got root permissions. This could have been caused by the backup module being run as root in the past.

You could try to delete the database dump file then run the web export again:

sudo rm -rf /home/pi/data/emoncms.sq


(Andrew Findlow) #3

Hi Glyn,
I ran the

emonPi update (Setup > Admin > emonPi update) in local Emoncms

just last month but this appears not to have updated, when was the backup module upgraded to 1.1.6?

Andrew


(Glyn Hudson) #4

Apologies, I just realised that V1.1.6 had not yet been released to the stable branch. It’s been done now :+1: