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
Might be coincidence, but I just had reason to stop one of my emonhub instances (this is just emonhub not an EmonSD) and it took an age to deactivate. It had been running for over 2 months.
@borpin
It has only failed once as far as I’m aware - was running it in an SSH terminal.
BUT normally my backups run weekly via a cronjob and so I would have been blissfully unaware of any earlier failures.
@TrystanLea
I’m impressed.
It would not let me make the change to master until I’d removed a personalised version of usb-import.sh.
Having done that, it switched to master.
The new emoncm-export.sh ran OK.
I’ve not checked the other 3 scripts
If you have a modified file, you will find git will never overwrite it (using git pull) so any update you do from the UI would not work. You always need to review the log after an update.