I’m running the Oct 2019 image updated to ver 10.2.6.
For the first time after very many uses, I had a problem running this script. From an SSH terminal:
=== Emoncms export start === Mon 28 Dec 17:56:19 GMT 2020 Backup module version: "version" : "2.2.6" EUID: 1000 Reading ./config.cfg.... Location of databases: /var/opt/emoncms Location of emonhub.conf: /etc/emonhub Location of Emoncms: /var/www/emoncms Backup destination: /var/opt/emoncms/backup emoncms backup module location /var/www/emoncms/Modules/backup Image version: emonSD-17Oct19 **Failed to stop feedwriter.service: Connection timed out** See system logs and 'systemctl status feedwriter.service' for details.
Despite the fact that feedwriter was not stopped, the script continued with:
adding /var/opt/emoncms/backup/emoncms.sql to archive -- *Then later:* phptimeseries/feed_16.MYD tar: phptimeseries/feed_16.MYD: file changed as we read it *Then later:* phptimeseries/feed_55.MYD Error: failed to tar phptimeseries
The Export/Backup finished but clearly it was flawed.
I then checked the feedwriter.service status. It was running and it stopped and restarted without problem. I then re-ran the Export/Backup script without any problem.
Looking at the script in detail, I wonder whether it might be cautiously smart to move lines 62 & 63 to earlier before any deletions are made. If feedwriter fails to stop then the script could exit and the user be prompted to try again.
# Disabled in @borphin commit? sudo service feedwriter stop
Just my thoughts