Backup module: Comments starting with # deprecated

Hi,
I’m now on 10.2.0 image from 2017.
I was thinking about upgrade to 2019 image but inside backup section this message :

Deprecated : Comments starting with ‘#’ are deprecated in /home/pi/backup/config.cfg on line 1 in /home/pi/backup/backup-module/backup_controller.php on line 25

Deprecated : Comments starting with ‘#’ are deprecated in /home/pi/backup/config.cfg on line 3 in /home/pi/backup/backup-module/backup_controller.php on line 25

Deprecated : Comments starting with ‘#’ are deprecated in /home/pi/backup/config.cfg on line 5 in /home/pi/backup/backup-module/backup_controller.php on line 25

Deprecated : Comments starting with ‘#’ are deprecated in /home/pi/backup/config.cfg on line 6 in /home/pi/backup/backup-module/backup_controller.php on line 25

Deprecated : Comments starting with ‘#’ are deprecated in /home/pi/backup/config.cfg on line 7 in /home/pi/backup/backup-module/backup_controller.php on line 25

Deprecated : Comments starting with ‘#’ are deprecated in /home/pi/backup/config.cfg on line 9 in /home/pi/backup/backup-module/backup_controller.php on line 25

Deprecated : Comments starting with ‘#’ are deprecated in /home/pi/backup/config.cfg on line 11 in /home/pi/backup/backup-module/backup_controller.php on line 25

Deprecated : Comments starting with ‘#’ are deprecated in /home/pi/backup/config.cfg on line 16 in /home/pi/backup/backup-module/backup_controller.php on line 25

Deprecated : Comments starting with ‘#’ are deprecated in /home/pi/backup/config.cfg on line 19 in /home/pi/backup/backup-module/backup_controller.php on line 25

Deprecated : Comments starting with ‘#’ are deprecated in /home/pi/backup/config.cfg on line 22 in /home/pi/backup/backup-module/backup_controller.php on line 25

Deprecated : Comments starting with ‘#’ are deprecated in /home/pi/backup/config.cfg on line 25 in /home/pi/backup/backup-module/backup_controller.php on line 25

Deprecated : Comments starting with ‘#’ are deprecated in /home/pi/backup/config.cfg on line 28 in /home/pi/backup/backup-module/backup_controller.php on line 25

Deprecated : Comments starting with ‘#’ are deprecated in /home/pi/backup/config.cfg on line 31 in /home/pi/backup/backup-module/backup_controller.php on line 25

Warning : Cannot modify header information - headers already sent by (output started at /home/pi/backup/backup-module/backup_controller.php:25) in /var/www/emoncms/index.php on line 377

what shoud I do ?
thx

Hello @lord_valex, @pb66 also raised this issue on github here hash symbols in config.cfg causing an error · Issue #38 · emoncms/backup · GitHub but its still open. It doesn’t seem to be an issue on the 2019 image for some reason… I’ve got it noted as a bug to look into but need to work out how to replicate the issue first as I havent personally experienced it.

What steps did you take to update your image? and can you copy here the Server Information from the emoncms admin page so that I can see the versions of the different software components that you have?

To progress quickly with an upgrade you might like to consider the Upgrade method detailed here Update & Upgrade - Guide | OpenEnergyMonitor using a USB SD card reader to import the data directly from the old SD card.

Hi
Thx for fast replay
Not yet updated… I updated emonpi to 10.2.0 and I was ready to make backup, but stopped all when I saw the error.
Error is using 2017 image and emonpi full update to 10.2.0
2019 image is from your shop not jet used.
I will you this new way with usb card reader, seams faster :wink: should revive it next week.

1 Like

If you are able to get your php version that would be useful, just to help with debugging the issue above for other users. If you type the following in a SSH terminal and paste the result here that would be great:

php -v

no problem here it is :

PHP 5.6.30-0+deb8u1 (cli) (built: Apr 14 2017 16:20:58)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

anything else ?

Cheers, same version in which this was seen before, useful to know.

I’ve implemented a fix for the errors above (remove comment lines starting with # · emoncms/backup@87791bc · GitHub).

Would you by any chance be able to test it @lord_valex, the steps on and old image are:

cd  /home/pi/backup
git checkout master
git pull origin master

On the new image (but should not be an issue):

cd  /opt/emoncms/modules/backup
git checkout master
git pull origin master

here I’m
umm not so smart give me help :wink:

pi@emonpi(ro):backup$ git checkout master
fatal: Unable to create ‘/home/pi/backup/.git/index.lock’: Read-only file system

what’s shoud I do ?

ah great try ‘rpi-rw’ and then rerun the commands then after completion run: ‘rpi-ro’

ok all fine
now enter the backup section and:

Error: missing backup config.cfg

shoud I make a reboot ?

Thanks @lord_valex hmm looks like a compatibility issue with the 2017 image. Perhaps going for the USB SD card reader upgrade method is your best bet at this point, to save you from needing to dive into this further…

Ok but now all inside backup section is disappeared, to came back to previus situation what should I do ?
Start a normal update will solve ?
Thx

I’ve now launched and update full inside admin section
All error was removed and all seams perfect.
You solve the problem :wink:

Great to hear!

That error can be caused by whitespace before <?php or after ?>

more info here: