Community
OpenEnergyMonitor

Community

Trying to make a backup hangs up my EmonPi


(Steve Davies) #1

Hi,

I have an EmonPi running “Powered by OpenEnergyMonitor.org | low-write 9.8.8 | 2017.07.18”.

I want to update it, but I have 18 months of data that I don’t want to lose.

When I try to run a backup in the web interface it doesn’t seem to complete. The display shows:

  === Emoncms export start ===
    Sat 22 Dec 12:25:29 UTC 2018
    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-07Nov16
    Emoncms MYSQL database dump complete, adding files to archive ..

If I login and look in /home/pi/data there is a tarball there but its truncated:

[email protected](ro):data$ tar tvf emoncms-backup-2018-12-22.tar 
-rw-r--r-- pi/pi       1379389 2018-12-22 12:25 emoncms.sql
-rw-rw-rw- pi/www-data    7370 2017-08-14 07:45 emonhub.conf
-rw-rw-r-- pi/www-data       0 2016-11-07 12:00 emoncms.conf
-rw-r--r-- pi/pi          6268 2017-08-14 14:27 settings.php
-rw-r--r-- pi/pi          5624 2016-11-07 12:00 flows_emonpi.json
-rw-r--r-- pi/pi           292 2016-10-30 10:54 flows_emonpi_cred.json
-rw-r--r-- pi/pi          8086 2016-02-06 00:21 settings.js
drwxr-xr-x www-data/root     0 2018-10-22 06:48 phpfina/
-rw-r--r-- www-data/www-data 17152716 2018-12-22 12:24 phpfina/17.dat
-rw-r--r-- www-data/www-data 17175668 2018-12-22 12:24 phpfina/4.dat
-rw-r--r-- www-data/www-data  1425108 2018-12-22 12:24 phpfina/34.dat
-rw-r--r-- www-data/www-data   352708 2018-12-22 12:24 phpfina/71.dat
-rw-r--r-- www-data/www-data 16722100 2018-12-22 12:24 phpfina/39.dat
-rw-r--r-- www-data/www-data       16 2017-08-12 12:52 phpfina/5.meta
-rw-r--r-- www-data/www-data 16722032 2018-12-22 12:24 phpfina/43.dat
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now

I’m not sure if its related, but I’m getting then very long “hangs” and the following logged by the kernel:

[ 1200.157177]       Not tainted 4.4.26-v7+ #915
[ 1200.157185] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[ 1200.157195] kworker/u8:0    D 805b6274     0     6      2 0x00000000
[ 1200.157230] Workqueue: kmmcd mmc_rescan
[ 1200.157263] [<805b6274>] (__schedule) from [<805b67ec>] (schedule+0x50/0xa8)
[ 1200.157284] [<805b67ec>] (schedule) from [<8046c7ec>] (__mmc_claim_host+0xb8/0x1cc)
[ 1200.157306] [<8046c7ec>] (__mmc_claim_host) from [<8046c930>] (mmc_get_card+0x30/0x34)
[ 1200.157327] [<8046c930>] (mmc_get_card) from [<80474a04>] (mmc_sd_detect+0x2c/0x80)
[ 1200.157348] [<80474a04>] (mmc_sd_detect) from [<8046ef40>] (mmc_rescan+0xc8/0x324)
[ 1200.157372] [<8046ef40>] (mmc_rescan) from [<8003c82c>] (process_one_work+0x154/0x458)
[ 1200.157395] [<8003c82c>] (process_one_work) from [<8003cb84>] (worker_thread+0x54/0x500)
[ 1200.157415] [<8003cb84>] (worker_thread) from [<80042860>] (kthread+0xec/0x104)
[ 1200.157435] [<80042860>] (kthread) from [<8000fbc8>] (ret_from_fork+0x14/0x2c)

Not sure if this is telling me that my SD is busted and has issues if it gets too full?

Otherwise I seem to be kinda stuck to update.

Thanks,
Steve

[edited formatting for better readability, please use 3 backticks ``` on the lines before and after any code or logfiles etc. @pb66]