Page 1 of 1

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

Posted: Wed Sep 11, 2013 2:21 pm
by knight-of-ni
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

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

Posted: Thu Sep 12, 2013 5:32 am
by mastertheknife
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

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

Posted: Wed Jan 01, 2014 9:04 pm
by marcmerlin
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.

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

Posted: Wed Jan 01, 2014 9:18 pm
by knight-of-ni
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.

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

Posted: Wed Jan 01, 2014 10:22 pm
by marcmerlin
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.

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

Posted: Mon Sep 21, 2015 5:16 pm
by ds18s20
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