Page 1 of 1

Can a camera ID be un deleted?

Posted: Tue Oct 14, 2008 1:33 pm
by jniffen
I am wondering is there a way to recover, undelete or how ever it's phrased the Monitor ID on the ZM console..

We will be installing a second 16 input card from BlueCherry and the ID numbers jump from 16 to 19. I know, I know it's not important but it will be asked by my supervisor.

Also, I know I deleted the IDs myself working on an issue which was realized as too many sub-directories in a directory.

Thanks for any input.

Posted: Wed Oct 15, 2008 2:46 pm
by kylejohnson
If you look at the Monitors table in your ZoneMinder database, the first field is "ID" and it is set to auto increment. So, if you delete a row (#16) from that table, and then add a new one, the new ID will be #17, since it is auto incrementing from the last value (even though it has been deleted).

To fix this, you could manually remove the auto increment value on the field, insert the correct number, and then turn auto increment back on.

I have never actually done this, but have had similar issues with programs that use MySQL as a backend... So, there may be other implications that arise.

Adjust MySQL auto increment. Be carefull with this.

Posted: Thu Oct 16, 2008 4:28 pm
by zoneminder
There is no trivial way to do it. The safest way would be to delete the monitors you want to move, do an 'alter table Monitors set auto_increment = xx' via mysql and then recreate them.

In 1.24.x the monitor ids are no longer displayed on the console so it would be less apparent.