Upgrade to 1.30.2 h264 videostorage branch database problems

Forum for questions and support relating to the 1.30.x releases only.
Locked
Khurram
Posts: 46
Joined: Tue Oct 09, 2007 5:29 pm
Location: Lahore, Pakistan

Upgrade to 1.30.2 h264 videostorage branch database problems

Post by Khurram »

I decided to upgrade my existing installtion 1.30.0 to 1.30.2 h264 videostorage branch available from iconnor repo. I used the method outlined in the "Ubuntu 16.04 - ZM 1.30.x Upgrade" section at https://wiki.zoneminder.com/Common_Issu ... _on_Ubuntu. The upgrade didn't give any errors butdid give a warning:

Code: Select all

Setting up zoneminder (1.30.2~20170221163027-xenial) ...
Installing new version of config file /etc/apache2/conf-available/zoneminder.conf ...

Initiating database upgrade to version 1.30.2 from version 1.30.0

Upgrading database to version 1.30.2
Loading config from DB
Saving config to DB
Upgrading DB to 1.30.1 from 1.30.0
mysql: [Warning] Using a password on the command line interface can be insecure.

Database successfully upgraded to version 1.30.1.
Upgrading DB to 1.30.2 from 1.30.0
mysql: [Warning] Using a password on the command line interface can be insecure.

Database successfully upgraded to version 1.30.2.

Database upgrade to version 1.30.2 successful.


Freshening configuration in database
Loading config from DB
Saving config to DB
Done Updating, starting ZoneMinder
But all my monitors are in red because I think the database did not get upgraded. In the log I get errors such as

Code: Select all

	zmc_dvideo13		13761	ERR	Can't load local monitors: Unknown column 'SaveJPEGs' in 'field list'
Do I have to upgrade the database manually? If so, how?

Thanks.
PacoLM
Posts: 971
Joined: Wed Dec 02, 2009 9:55 pm
Location: Spain

Re: Upgrade to 1.30.2 h264 videostorage branch database problems

Post by PacoLM »

Try this-> sudo /usr/bin/zmupdate.pl

After more than 15 years, no longer using ZM as surveillance system.
Now in the dark side, using a commercial system...
Khurram
Posts: 46
Joined: Tue Oct 09, 2007 5:29 pm
Location: Lahore, Pakistan

Re: Upgrade to 1.30.2 h264 videostorage branch database problems

Post by Khurram »

PacoLM wrote:Try this-> sudo /usr/bin/zmupdate.pl
Should I do this after apt upgrade finishes?

Edit:
I tried it after apt upgrade and got the following message

Code: Select all

Database already at version 1.30.2, update aborted.
SteveGilvarry
Posts: 494
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: Upgrade to 1.30.2 h264 videostorage branch database problems

Post by SteveGilvarry »

Let me check this, there are some db changes that h264 needs but they never get a version number as they are not released. The readme of that branch does mention them, and I believe a new db from scratch has the fields in monitor table. When it goes to master zmupdate will work.
Production Zoneminder 1.37.x (Living dangerously)
Random Selection of Cameras (Dahua and Hikvision)
Khurram
Posts: 46
Joined: Tue Oct 09, 2007 5:29 pm
Location: Lahore, Pakistan

Re: Upgrade to 1.30.2 h264 videostorage branch database problems

Post by Khurram »

SteveGilvarry wrote:Let me check this, there are some db changes that h264 needs but they never get a version number as they are not released. The readme of that branch does mention them, and I believe a new db from scratch has the fields in monitor table. When it goes to master zmupdate will work.
Any update on this? Thanks.

Edit:
Also found this https://gist.github.com/mastertheknife/8042406. Will running this sql script on the database after the upgrade has finished do the job?
SteveGilvarry
Posts: 494
Joined: Sun Jun 29, 2014 1:12 pm
Location: Melbourne, AU

Re: Upgrade to 1.30.2 h264 videostorage branch database problems

Post by SteveGilvarry »

https://github.com/ZoneMinder/ZoneMinde ... 1.29.2.sql
So this is the one, problem being this only exists in that branch and you are coming from 1.30 so it is not applying. I believe you can do zmupdate.pl --version=1.29.1, which will reapply the db changes and pick this one up. When we go into mainline this script will get the next version number and upgrades will be less seamed.
Production Zoneminder 1.37.x (Living dangerously)
Random Selection of Cameras (Dahua and Hikvision)
Khurram
Posts: 46
Joined: Tue Oct 09, 2007 5:29 pm
Location: Lahore, Pakistan

Re: Upgrade to 1.30.2 h264 videostorage branch database problems

Post by Khurram »

SteveGilvarry wrote:https://github.com/ZoneMinder/ZoneMinde ... 1.29.2.sql
So this is the one, problem being this only exists in that branch and you are coming from 1.30 so it is not applying. I believe you can do zmupdate.pl --version=1.29.1, which will reapply the db changes and pick this one up. When we go into mainline this script will get the next version number and upgrades will be less seamed.
That solved the problem, thanks :D
Locked