I just migrated my Pi to the latest SD image and had to import a backup from my old emonpi. Unfortunately, although the backup went well, the downloaded file got corrupted somehow and failed to uncompress… but did not show any errors ! Some of my backuped feeds were corrupted but I only noticed it after a day because data was not displayed correctly and I get some errors inn emoncms logs complaining about missing meta file.
There is no error checking in the script and it seems that standard error output is not showed / trapped in the log file probably due to the way php is launching the script. So there was no way to know something went wrong and the import script happily reports everything is ok
Errors are displayed when running the script manually.
So I modified the script (mainly added some return codes tests and redirecting error to standard output) but I did not find any “best practices” to propose my updates… Should I just send a pull request ?