***IMPORTANT*** How to run zmupdate for existing systems

Forum for questions and support relating to the 1.26.x releases only.
Post Reply
User avatar
knight-of-ni
Posts: 2229
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

***IMPORTANT*** How to run zmupdate for existing systems

Post by knight-of-ni » Wed Sep 11, 2013 2:21 pm

I'm starting to see a pattern of issues with those trying to upgrade their existing zoneminder systems to 1.26, and some issues seem to be centered around properly running the zmupdate script.

Note that the only 100% guaranteed way to update any zoneminder database to a newer version is to run it exactly like so:

Code: Select all

sudo zmupdate.pl --user=root --pass={mysql_root_password}
During previous upgrades, one may have been able to get away with running zmupate differently, but in the case of 1.26 the changes require elevated permissions.

WARNING: If you run zmupdate.pl by simply executing "zmupdate.pl" with no options from the command line, the upgrade to 1.26 will not be successful even if zmupdate does not report an error.

Unconfirmed symptoms of an improperly run zmupdate include the following:
  • All events disappear after zmupdate is run
  • All monitors in black & white
  • No 32bit color option
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/

mastertheknife
Posts: 678
Joined: Wed Dec 16, 2009 4:32 pm
Location: Israel

Re: ***IMPORTANT*** How to run zmupdate for existing systems

Post by mastertheknife » Thu Sep 12, 2013 5:32 am

knnniggett wrote: Unconfirmed symptoms of an improperly run zmupdate include the following:
  • All events disappear after zmupdate is run
  • All monitors in black & white
  • No 32bit color option
All events disappear after zmupdate is run - This can happen if events path (DIR_EVENTS) changed and the PurgeWhenFull filter is enabled to run in the background. The filter will run and see events in the database but not in the file system, thinking they were "fast deleted" (OPT_FAST_DELETE) and delete them from the database. Workaround: Disable filters before upgrade until everything is ok.

All monitors in black & white - This is the normal. The field to store the "Target Colorspace" (Colours in DB) defaults to black and white, so after an upgrade from a stock version of ZM, the user needs to go to each monitor to set "Target Colorspace" to 24bit or 32bit if interested in colour.

No 32bit color option - The web files were not updated on the system. Most likely installed to somewhere else (wrong --with-webdir for example).


mastertheknife
Kfir Itzhak.

marcmerlin
Posts: 65
Joined: Thu Jan 17, 2013 6:13 pm

Re: ***IMPORTANT*** How to run zmupdate for existing systems

Post by marcmerlin » Wed Jan 01, 2014 9:04 pm

I updated to zoneminder 1.26.5 on debian testing, and sure enough all my monitors went black and white. It took me a while to find this message.

I hand fixed all my cameras to be back to 24bit and things look ok now. Anything else I need to hand fix?

By the way, the debian package upgrade says:
/var/lib/dpkg/info/zoneminder.postinst
invoke-rc.d zoneminder stop || true
zmupdate.pl --nointeractive --version $OLD_ZM_VERSION

Should the debian maintainer fix this?

Is there anything else I need to hand fix in my DB? Everything else seems to work.

User avatar
knight-of-ni
Posts: 2229
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: ***IMPORTANT*** How to run zmupdate for existing systems

Post by knight-of-ni » Wed Jan 01, 2014 9:18 pm

We've made some changes to the zupdate script and to the zoneminder documentation since this thread was created.

In summary, as long as your zmuser has the following minimum permissions:

Code: Select all

grant select,insert,update,delete,lock tables,alter on zm.* to '<database user>'@localhost identified by '<database password>';
Then you are currently safe by running "zmupdate.pl" w/o any additional parameters.

The parameters you see in the debian package installation script are there to automate things w/o asking the user a lot of questions. They should be fine. The intent of this post was for those who need to run zmupdate manually, after installation of their (rpm) package.

It seems we released 1.26.5 a little early and there are two additional things you should check:
1) make sure ptz control scripts are working
2) make sure filters are working

These have been fixed upstream.
You'll see errors in your logs if they aren't fixed in your installation. Workarounds are posted in other threads in this forum.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/

marcmerlin
Posts: 65
Joined: Thu Jan 17, 2013 6:13 pm

Re: ***IMPORTANT*** How to run zmupdate for existing systems

Post by marcmerlin » Wed Jan 01, 2014 10:22 pm

Thanks.
I think my filters are still working.
PTZ, I never got to work with my camera, so I would not have lost them :)

Sounds like I'm mostly good then, but I wanted to warn you that the default debian upgrade indeed broke color out of the box for me, and took a while to fix (until I found this thread).
I updated the FAQ on the ZM wiki to put a pointer here for black and white issues.

ds18s20
Posts: 5
Joined: Wed Dec 28, 2011 3:26 am

Re: ***IMPORTANT*** How to run zmupdate for existing systems

Post by ds18s20 » Mon Sep 21, 2015 5:16 pm

I found out that after the upgrade I did end up with b&w monitors and editing each one using the web GUI fixed it for me

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest