Zoneminder-notes: Difference between revisions

From I Will Fear No Evil
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 4: Line 4:
* [https://forums.zoneminder.com/viewtopic.php?t=4576_0Lt_DW1cggPr7dOBj|Zoneminder foum post on blob detection]
* [https://forums.zoneminder.com/viewtopic.php?t=4576_0Lt_DW1cggPr7dOBj|Zoneminder foum post on blob detection]
* [https://wiki.zoneminder.com/How_to_get_ssmtp_working_with_Zoneminder|Zoneminder ssmtp configuration example]
* [https://wiki.zoneminder.com/How_to_get_ssmtp_working_with_Zoneminder|Zoneminder ssmtp configuration example]
===== Rebuild database after Docker clobbers it =====
<pre>
Copy database from /opt/Zoneminder/mysql /opt/mysql
mysqldump -u zmuser -pzmpass zm  >> /tmp/dump.sql
mysql_install_db --user=mysql --datadir=/opt/mysql --basedir=/usr ----auth-root-authentication-method=socket
login to database:
use mysql;
create USER 'zmuser'@'localhost' IDENTIFIED BY 'zmpass';
grant all privileges on zm.* to 'zmuser'@'localhost';
flush privileges;
create database zm;
sudo mysql -u root -S /var/run/mysqld/mysqld.sock zm < /tmp/dump.sql
stop database
copt database back into //opt/Zoneminder/mysql
chown back to correct usierid (will not match mysql)
</pre>
Make damn sure that you lock down the docker version
<pre>
apt-mark showhold
docker-ce
docker-ce-cli
docker-ce-rootless-extras
docker-scan-plugin
</pre>
[[Category:Zoneminder]]
[[Category:Zoneminder]]

Revision as of 10:24, 14 February 2022

Zoneminder configuration information specific to the alarm filtering can be found in the following areas..

Rebuild database after Docker clobbers it
Copy database from /opt/Zoneminder/mysql /opt/mysql

mysqldump -u zmuser -pzmpass zm  >> /tmp/dump.sql

mysql_install_db --user=mysql --datadir=/opt/mysql --basedir=/usr ----auth-root-authentication-method=socket

login to database:
use mysql;
create USER 'zmuser'@'localhost' IDENTIFIED BY 'zmpass';
grant all privileges on zm.* to 'zmuser'@'localhost';
flush privileges;
create database zm;

sudo mysql -u root -S /var/run/mysqld/mysqld.sock zm < /tmp/dump.sql
stop database
copt database back into //opt/Zoneminder/mysql
chown back to correct usierid (will not match mysql)

Make damn sure that you lock down the docker version

 apt-mark showhold
docker-ce
docker-ce-cli
docker-ce-rootless-extras
docker-scan-plugin