Page 1 of 1

Reinstallation of Zoneminder 1.30.2

Posted: Sat Feb 25, 2017 11:30 pm
by JTheDoc
Hello, nothing major, but I have had issues with the outlines not being displayed on the events page for alarms. I checked and it appears that it has been fixed in this release. I also noticed that zones do not change colour in the colour tabs, such as inclusive, active, and so on that allow colour changes.
I did update to this release, but had issues with it installing, can't remember precisely what, but I managed to fix it.

I wanted to ask if someone knew reinstalling, whether by purge, reinstall, would actually delete my current settings? Such as cameras, zones, events, so on.
If someone had advice as to how I could do this to fix any conflicts or issues that may have been caused by the install failing, I'd appreciate it a lot.

TL;DR: Will reinstalling delete my existing settings, or will it simply just uninstall, then install again. Or will using purge, and then manually installing be the better way to do this, and if so, will it delete anything.

Re: Reinstallation of Zoneminder 1.30.2

Posted: Sun Feb 26, 2017 2:56 am
by SteveGilvarry
Settings are all in the DB, back it up, and don't do any delete or create actions in mysql and it should still be there. Events is trickier they are stored in DB, but also audited that they exist in filesystem, so backup the event file location if you can.

Re: Reinstallation of Zoneminder 1.30.2

Posted: Sun Feb 26, 2017 8:05 pm
by JTheDoc
Thank you for the reply. Where precisely would the DB Settings be located? I have set up a symbolic link for the event DB, would that also move my settings?

Cheers! :)

Re: Reinstallation of Zoneminder 1.30.2

Posted: Mon Feb 27, 2017 11:48 am
by SteveGilvarry
Symbolic links are file system based, so they point directories, that contain files, in this case the event directory, which has lots of JPG files stored away that is your actual content. So that is where all the events live in terms of image files, but the metadata for the events is stored in a database (db), this is all the data about the event and holds the names of all the files in the events directories.

So to be safe you need to backup the events folder, the one on the end of the symbolic link, not the link itself. And backup the mysql database for zm, that is where all your monitor settings etc are. This can be done with mysqldump, just google mysql backup. You will need to backup database called zm.

Debian based distros don't do any database actions during install, so you will probably find the db is all good after reinstall. But I am saying do the backup as Murphy's law says if you don't then you should have.
Just don't run
mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql
during the install this time, as that will drop your database and all settings will be gone and then you will be looking at how to restore mysql database.

Re: Reinstallation of Zoneminder 1.30.2

Posted: Mon Feb 27, 2017 4:24 pm
by bbunge
The Ubuntu version is back to doing auto database install. If there is a zm database in MySQL or Mariadb it will do an update to the existing database and not overwrite the entire database. Still a good idea to take a dump of the database before doing an upgrade of Zoneminder.

Debian does need a manual database upgrade or install.

Re: Reinstallation of Zoneminder 1.30.2

Posted: Tue Feb 28, 2017 8:41 am
by JTheDoc
Excellent, thank you for the very informative instructions. I'll play on the safe side and do the backup so I at least have something should something unrelated go wrong in the future also.

I'll inform if there's any problems, but I should expect it'll be fine so long as I can restore the backup. Using the Ubuntu version so that'll be a little more convenient with the auto restore for mysql.