Did Old Events Get Placed Elsewhere During Upgrade?

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
snakeice
Posts: 7
Joined: Mon Oct 15, 2018 9:14 pm

Did Old Events Get Placed Elsewhere During Upgrade?

Post by snakeice »

This upgrade from 1.30.4 to 1.32.1 on Fedora 28 was an adventure! It appears I lost at least a days worth of events as I had just went through and pruned events 24 hours before this update and had lost other events it seems in some other pre-update event I’m still not certain of but now have suspicions since I see the zm.conf.rpmnew is dated about the time of the other event before I performed a much needed “dnf update” on my system hours ago.

My current issue is my events are missing after working through several other post update surprises like:
• No Web GUI getting 404 error and zoneminder services wouldn’t start
◦ Missing /etc/httpd/conf.d/zoneminder.conf
▪ Had to redo install step to symbolically link to /etc/zm/www/zoneminder.conf
• ln -s /etc/zm/www/zoneminder.conf /etc/httpd/conf.d/
• Not sure if needed or not but had to change ownership of /usr/share/zoneminder/www/
◦ chown apache:apache -R /usr/share/zoneminder/www/

• Thought I had borked up my bind mounts in “/etc/fstab” so went through commenting them out then placing them back in place as I was getting the “DiskSpace: Event does not exist ...” messages.
• Once got GUI up thought css or something else was hosed as this drastic departure from one interface to the other.
• Then with events not playing from the prior day I really thought things were bad.
• Had to go into my monitors source→storage → <choose a video writer> to get new events to play and be able to use the “event playback features” like “fast forward”, “pause” etc.. something I saw in this forum.
• I even went and played with Shinobi for a while...

This is where my real question begins after frustration of above items:

I turned on logging in the options menu in the GUI and then tried to access the events from a day prior and that’s where I saw the paths issue:
• This is what the old paths looked like in 1.30.4:
◦ ../events/6/18/10/11/11/05/26
• This is what the new paths look like now in 1.32.1:
◦ ../events/7/2018-10-15/4124

The old path structure I can still see from the events I had archived which Zoneminder saved which proves Zoneminder could have saved my non-archived events but didn’t unless I just can’t find them.

My question is looks like in 1.32.1 the path structure changed in Events and there was no mechanism to cleanly move events to the new structure or am I missing where they placed the events as the DB still thinks they exist but Zoneminder clearly can’t find them?

Second question is does the date on my zm.conf.rpmnew mean there was some pre-update activity before I did the manual update or is that just the create date of the file that was plopped on the server?
mikb
Posts: 600
Joined: Mon Mar 25, 2013 12:34 pm

Re: Did Old Events Get Placed Elsewhere During Upgrade?

Post by mikb »

Your observed difference between the DB paths to events, and to the file system path to events -- seems to be connected to this thread here ...

viewtopic.php?f=38&t=27664

Regarding selecting the "storage scheme".

I wonder if this setting (and implications around a different default?) is why people have been having the "wait, where did all my events go?" complete wipe-outs on the latest upgrade?

1) Path in database refers to an event, which there is no such file for (due to looking in wrong place) and also
2) Path on disk refers to an event, for which there is no database entry.

Either way, ZMAudit comes along and clears both off. Problem, umm, solved?
snakeice
Posts: 7
Joined: Mon Oct 15, 2018 9:14 pm

Re: Did Old Events Get Placed Elsewhere During Upgrade?

Post by snakeice »

I see what you are saying and agree this most likely may be the issue:
deep = ◦ ../events/6/18/10/11/11/05/26
Medium = ◦ ../events/7/2018-10-15/4124

My issue now is that I don't seem to be able to change the "storage scheme" on my current default storage too "Deep" from "Medium" which I actually prefer.

As you said maybe the issue is resolved if it means "ZMAudit" came through saw the discrepancy in the events path and database after the upgrade defaulted away from "Deep" to "Medium" "Storage Scheme" then removed the events that had previously been saved in "Deep" format and then at some point removed DB pointers to the old events path. Is that correct or am I off base?

For me I didn't lose much I just started using Zoneminder in August with a couple of cameras recording and intend to redesign and maybe rebuild and haven't had super critical events but did have some I wanted to save and analyze for later so this is good for me to understand this properly. I appreciate your taking the time to respond.
codabiz
Posts: 59
Joined: Sun Jan 04, 2009 10:16 am
Location: London, UK

Re: Did Old Events Get Placed Elsewhere During Upgrade?

Post by codabiz »

Good explanation.
However, following an upgrade to 1.32.2 and the consequent deletion of images: orphaned events are still showing in the database, and storage is 100GB higher than actual.
I have tried various filters to remove the old orphaned events but this does not work. ZMaudit also does not clear these orphaned events from the database. Do I, or can I manually purge them from the database?
Post Reply