Continuing the discussion from emonSD-03May16 Release:
Can the Import Backup routine delete files that cause an error (e.g., “Sorry, there was an error uploading the file”)?
Details - TL;DR
During my migration to the emonSD-03May16 image I stumbled across an issue. I clicked Create Backup (Setup > Backup > Export > Create Backup) and had downloaded the emoncms-backup-2016-05-06 file. In my haste I had download the tar file instead of the tar.gz file.
With the new SD Card inserted and the new image running I clicked Import Backup (Setup > Backup > Import > Import Backup) with the tar file and it failed with this error:
I realized my error, plugged in the old SD Card, created a new backup file and download the correct emoncms-backup-2016-05-06.tar.gz file.
With the new SD Card inserted (again) and the new image running I ran the Import Backup with the proper tar.gz file. It didn’t work! I think the emonPi spit out a similar error.
I found the error was caused by the original tar file, emoncms-backup-2016-05-07.tar, was still available in the /home/pi/data/uploads directory. I’m not sure if the upload routine was finding the tar file first or if I used up all the available data space in the /home/pi/data area.
Once I deleted the emoncms-backup-2016-05-07.tar then all worked OK and the tar.gz loaded as expected.