rip wrote:I was wondering what the safest way to use Issac Connor's PPA/Package *Thank You, BTW*) when dealing with non-standard locations for images and events.
What, you mean you don't want to chuck everything in /usr/share/zoneminder? How dare you!!
(...neither did I.
I have links to a 2TB raid for that stuff, so moving it is a problem.
I'm in a much worse case; I have 20TB
of ZFS storage, but /usr/ lives on a 120GB SSD! It's physically impossible
for me to simply move the data where the original symlinks pointed to!
I'm assuming the solution I want is probably hacking up the default script for this, but figured I better ask...as I am also making the gross assumption I'm not the only person so situated.
I came up with a better method than hacking up the default install script. Seems to have worked, though my upgrade is only a few hours old. Using this method, all
old events were preserved and zmaudit doesn't go nuts. Pretty much everything I could have asked for!
- First, back up your zm database and take a snapshot of wherever your images and events are stored. If your FS doesn't support snapshots, back up the images and events directory, just in case things go horribly wrong.
- From the web gui, disable all filters that delete events and run in the background. Just in case.
- From the web gui, disable zmaudit in options. (Again, just in case!)
- Open a terminal and become root so you don't have to type "sudo" in front of the next fourteen commands.
- Stop zoneminder
- Now you need to rename your existing symlinks in /usr/share/zoneminder , so that you can put them back after you upgrade.
mv events events.temp
mv images images.temp
- Make the symlinks that the zoneminder script is expecting to find, so it stops complaining.
ln -s /var/cache/zoneminder/events /usr/share/zoneminder/events
ln -s /var/cache/zoneminder/images /usr/share/zoneminder/images
- Add the repository & refresh.
- Now do the upgrade but prevent zoneminder from restarting.
RUNLEVEL=1 apt-get install zoneminder
(hit Y to convert from myisam to innodb. You'll get an error at the end of the process because you prevented zoneminder from restarting by dropping to runlevel 1. This is expected.)
DON'T RESTART ZONEMINDER YET!!
- At this point, if you added a sleep command like I did to the zoneminder startup script, go add it back into /etc/init.d/zoneminder .
- Remove garbage symlinks and replace with your good ones.
mv events.temp events
mv images.temp images
- Go into web GUI (yes, zoneminder is still stopped, it'll still work) and go into every camera. Change colorspace to 24 or 32BPP. Unless you like B&W, of course!
- Start zoneminder from either the command prompt or from the web GUI.
- Give everything a once over, look at all the cameras, etc.
- Re-enable delete filters and zmaudit. Hold breath for ten minutes. If zmaudit doesn't go crazy deleting everything, success!
I have a mix of analog (via blurcherry card) and IP cameras (Mostly Arecont) that took a long time to get dialed in, rather not do that again.
Welll, you might be in for a rough ride. With 1.25 I had things dialed in so that I didn't get any false alarms pretty much... ever. First few hours with 1.26.5, all of my cameras are now false triggering and I can't figure out why. When I finish this reply I'm going to do some differential analysis in photoshop to see if things are changing in the images that my eye can't see, or if I've hit a nasty bug in 1.26.5 in zma. Stay tuned to the next thread!