Emonpi backup stalling - emoncms-export.sh: line 98: syntax error

Hi,
I have a new install of emonpi 9.8.27 running and have been using the backup feature flawlessly every day or so for the last week, but yesterday it stalled with this output in the window

=== Emoncms export start ===
Mon 8 Jan 08:40:42 AEDT 2018
EUID: 1000
Reading /home/pi/backup/config.cfg…
Location of mysql database: /home/pi/data
Location of emonhub.conf: /home/pi/data
Location of emoncms.conf: /home/pi/data
Location of Emoncms: /var/www/emoncms
Backup destination: /home/pi/data
Image version: emonSD-26Oct17
new image
Emoncms MYSQL database dump complete, adding files to archive …

I rebooted through the control panel as the feedwriter stops also and try again but no good. I tried through the terminal as shown in the manual and it reports syntax fault in the script:

pi@emonpi(rw):~$ ~/backup/./emoncms-export.sh
=== Emoncms export start ===
Mon 8 Jan 21:20:53 AEDT 2018
EUID: 1000
Reading /home/pi/backup/config.cfg…
Location of mysql database: /home/pi/data
Location of emonhub.conf: /home/pi/data
Location of emoncms.conf: /home/pi/data
Location of Emoncms: /var/www/emoncms
Backup destination: /home/pi/data
Image version: emonSD-26Oct17
new image
Emoncms MYSQL database dump complete, adding files to archive …
/home/pi/backup/./emoncms-export.sh: line 98: syntax error near unexpected token fi' /home/pi/backup/./emoncms-export.sh: line 98: fi’

I’ve had a quick look at the script and but don’t see anything obvious. It may only be me, but just incase it is not…

Try adding “then” to the end of line 89 (and line 100).

[EDIT] Just went to do PR and found a one has already been submitted for this bugfix, now merged so please try again after an update.

That’s it. Thanks.

Just out of interest, I’m literally running a bare pi with only and sd card and ethernet cable. I’m not making use of the any of the wireless modules or directly connected Arduino etc. Of the 2 update options, emonpi and emonbase, I assume only the emonbase option is the only one that will make any differences to my system, but there is no harm running both every so often?

The difference between the “update emonpi” and “update emonbase” options via the Admin page of emoncms is only relative to the firmware uploaded to a GPIO attached emonpi or rfm2pi board. The rest of the process and software is identical.

If you do not have an emonpi or rfm2pi (or other serial device) attached to the GPIO, it will make no difference which you use and no benefit in using both. [correction - see the 15th post of Update EmonPi Button or Update EmonBase Button? - #15 by pb66] If you do have a serial device on the GPIO you will need to make your choice carefully as using the wrong one could overwrite your device with incompatible firmware which may not be straightforward to recover from.

[See the Update EmonPi Button or Update EmonBase Button? thread for more info]

Perfectly clear. Thanks again.