Restoring a deleted monitor
Restoring a deleted monitor
is there a way to change the id of a current monitor to an accidently deleted one?
I wondered the very same thing a while back but it seems it's not quite that simple...!
http://www.zoneminder.com/forums/viewtopic.php?t=8576
Do give the suggestion a try though, and tell us whether it works or not!
Mathew
http://www.zoneminder.com/forums/viewtopic.php?t=8576
Do give the suggestion a try though, and tell us whether it works or not!
Mathew
Good find. I figured there was more to it than just the ID in the table. I figured events directories might still exist so maybe they wouldn't have to be re-created or modified, but obviously if you go changing things with archived events (or even just non-deleted events) things will point to the wrong place if you to changing table values.
Last time I had to do this, I just reinstalled ZM. It was easier since I had 11 monitors with numbers all over the place.
Last time I had to do this, I just reinstalled ZM. It was easier since I had 11 monitors with numbers all over the place.
Almost there....
I tracked down instances of MonitorId
Shut down zoneminder
Backed up DB
Ran UPDATE statements to change the monitor ID's
Renamed the monitor number and re-linked dir's in events dir
Restarted ZM and watched zmaudit.pl blow away events not connected
to the new Monitor number.
Any suggestion to change the association of the events so zmaudit dosent destroy the recorded events in the DB would be great.
Shut down zoneminder
Backed up DB
Ran UPDATE statements to change the monitor ID's
Renamed the monitor number and re-linked dir's in events dir
Restarted ZM and watched zmaudit.pl blow away events not connected
to the new Monitor number.
Any suggestion to change the association of the events so zmaudit dosent destroy the recorded events in the DB would be great.
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
If you just change the MonitorId in the Events table that will change the association in the DB. You will need to make sure that the files are relocated to the correct path under the events directory as well. Those two things should be enough but I always recommend keeping a backup just in case or trying with a couple of test events before doing the rest.
Phil