Backup and restore to lastest EmonPI Image

I have taken a backup its 505mb
I loaded the image to a 16gb card and tried a restore got an error back about no disk Cannot write: No space left on device.

I found a 64gb card and ran sudo /opt/emoncms/modules/usefulscripts/sdpart/./sdpart_imagefile . waited 30 min the partition /var/opt/emoncms now shows 50.55gb free. but the restore still fails.

it looks like the restore uses /opt/openenergymonitor/data/upload

I dont know how to fix this.

server info below

Server Information

Server Information

Services

  • emonhub :- Active Running
  • emoncms_mqtt :- Active Running
  • feedwriter :- Active Running - sleep 300s 0 feed points pending write
  • service-runner :- Active Running
  • emonPiLCD :- Active Running
  • redis-server :- Active Running
  • mosquitto :- Active Running
  • demandshaper :- Active Running

Emoncms

Server

  • OS :- Linux 4.19.75-v7+
  • Host :- emonpi | emonpi | (192.168.1.102)
  • Date :- 2020-01-12 16:34:33 UTC
  • Uptime :- 16:34:33 up 22 min, 1 user, load average: 0.99, 1.16, 0.75

Memory

  • RAM :- Used: 17.21%
    • Total :- 975.62 MB
    • Used :- 167.94 MB
    • Free :- 807.68 MB
  • Swap :- Used: 22.50%
    • Total :- 100 MB
    • Used :- 22.5 MB
    • Free :- 77.5 MB
      Write Load Period

Disk

  • / :- Used: 58.84%
    • Total :- 3.92 GB
    • Used :- 2.31 GB
    • Free :- 1.42 GB
    • Write Load :- 3.15 MB/s (23 mins)
  • /boot :- Used: 20.55%
    • Total :- 252.05 MB
    • Used :- 51.79 MB
    • Free :- 200.25 MB
    • Write Load :- 0.37 B/s (23 mins)
  • /var/opt/emoncms :- Used: 0.00%
    • Total :- 50.55 GB
    • Used :- 1.71 MB
    • Free :- 47.98 GB
    • Write Load :- 66.45 B/s (23 mins)
  • /var/log :- Used: 4.98%
    • Total :- 50 MB
    • Used :- 2.49 MB
    • Free :- 47.51 MB
    • Write Load :- n/a

HTTP

  • Server :- Apache/2.4.38 (Raspbian) HTTP/1.1 CGI/1.1 80

MySQL

  • Version :- 5.5.5-10.3.17-MariaDB-0+deb10u1
  • Host :- localhost:6379 (127.0.0.1)
  • Date :- 2020-01-12 16:34:32 (UTC 00:00‌​)
  • Stats :- Uptime: 1402 Threads: 14 Questions: 4610 Slow queries: 0 Opens: 46 Flush tables: 1 Open tables: 40 Queries per second avg: 3.288

Redis

  • Version :-
    • Redis Server :- 5.0.3
    • PHP Redis :- 5.0.2
  • Host :- localhost:6379
  • Size :- 65 keys (844.17K)
  • Uptime :- 0 days

MQTT Server

  • Version :- Mosquitto 1.5.7
  • Host :- localhost:1883 (127.0.0.1)

PHP

  • Version :- 7.3.9-1~deb10u1 (Zend Version 3.3.9)
  • Modules :- apache2handler | calendar v7.3.9-1~deb10u1 | Core v7.3.9-1~deb10u1 | ctype v7.3.9-1~deb10u1 | curl v7.3.9-1~deb10u1 | date v7.3.9-1~deb10u1 | dom v20031129 | exif v7.3.9-1~deb10u1 | fileinfo v7.3.9-1~deb10u1 | filter v7.3.9-1~deb10u1 | ftp v7.3.9-1~deb10u1 | gd v7.3.9-1~deb10u1 | gettext v7.3.9-1~deb10u1 | hash v7.3.9-1~deb10u1 | iconv v7.3.9-1~deb10u1 | json v1.7.0 | libxml v7.3.9-1~deb10u1 | mbstring v7.3.9-1~deb10u1 | mosquitto v0.4.0 | mysqli v7.3.9-1~deb10u1 | mysqlnd vmysqlnd 5.0.12-dev - 20150407 - $Id: 7cc7cc96e675f6d72e5cf0f267f48e167c2abb23 $ | openssl v7.3.9-1~deb10u1 | pcre v7.3.9-1~deb10u1 | PDO v7.3.9-1~deb10u1 | pdo_mysql v7.3.9-1~deb10u1 | Phar v7.3.9-1~deb10u1 | posix v7.3.9-1~deb10u1 | readline v7.3.9-1~deb10u1 | redis v5.0.2 | Reflection v7.3.9-1~deb10u1 | session v7.3.9-1~deb10u1 | shmop v7.3.9-1~deb10u1 | SimpleXML v7.3.9-1~deb10u1 | sockets v7.3.9-1~deb10u1 | sodium v7.3.9-1~deb10u1 | SPL v7.3.9-1~deb10u1 | standard v7.3.9-1~deb10u1 | sysvmsg v7.3.9-1~deb10u1 | sysvsem v7.3.9-1~deb10u1 | sysvshm v7.3.9-1~deb10u1 | tokenizer v7.3.9-1~deb10u1 | wddx v7.3.9-1~deb10u1 | xml v7.3.9-1~deb10u1 | xmlreader v7.3.9-1~deb10u1 | xmlwriter v7.3.9-1~deb10u1 | xsl v7.3.9-1~deb10u1 | Zend OPcache v7.3.9-1~deb10u1 | zlib v7.3.9-1~deb10u1

Pi

  • Model :- Raspberry Pi 3 Model B Rev 1.2 - 1GB (Sony UK)

  • Serial num. :- 43DDB2EE

  • Temperature :- 51.54°C - 51.5°C

  • emonpiRelease :- emonSD-17Oct19

  • File-system :- read-write

Client Information

Client Information

HTTP

  • Browser :- Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0
  • Language :- en-US,en;q=0.5

Window

  • Size :- 1903 x 966

Screen

  • Resolution :- 1920 x 1080

Ah I think the backup file will be too big - it is a php limit that is set IIRC. I suggest using the USB restore method.

@TrystanLea another thing to mention in the upgrade documentation (i.e. what the size limit is).

The card reader I have is SD, microSD and CF memory card readers - Kingston Technology which supports both SD and MicroSD.

Once the EmonPi has finished updating I can see in the logs its download the usb-import.sh I plugin my card reader but dont get the menu for the USB Import.

Will i have the same problem with backups?

I think I have managed to get the usb to work, needed to run it from SSH session.

32/64GB Cards a cheap, why are you still trying to use a 16gb card. I would like to see a automated nightly or weekly backup. Also to include an option to an external USB drive.

if you need some 64GB cards let me know and i will send an amazon voucher over…

Apologies, I missed merging the latest version of the backup module into stable. I have now done this, if you re-run the emoncms updater it should now appear.

Noted issue with location of upload and file size limit, I will move the upload location to the data partition as discussed in the other post. Thanks!

1 Like

When you click backup where is the backup stored?

On import or export? They are different IIRC.

I have suggested a method in this issue Use drop-in to modify php configuration · Issue #42 · emoncms/backup · GitHub to modify the behaviour of PHP for the backup module (without editing the php.ini file).

You could create this drop-in so it modifies the behaviour for you.

1 Like