Page 1 of 1
Get old confuguration from SD card?
Posted: Thu Dec 16, 2021 1:53 pm
by david1234
Hello,
I had a working zoneminder server until my PI stop working
the SD is working ,
but now I want to use stornger computer (and not PI3)
is there any way to see the camera setting I have used? (fps,path,etc...)
I looked at
/etc/zm
but no data about the cameras there , just for the server
so can I found this config file somewhere?
*** I don't have another PI in order work on with the same SD ....
Thanks ,
Re: Get old confuguration from SD card?
Posted: Thu Dec 16, 2021 2:43 pm
by Magic919
If you can grab the MySQL database, it'll have most of what you'll need.
Re: Get old confuguration from SD card?
Posted: Thu Dec 16, 2021 3:11 pm
by david1234
I think I can
I get access to the all SD
can you explian to me what to do ?
Thanks,
Re: Get old confuguration from SD card?
Posted: Thu Dec 16, 2021 4:40 pm
by kitkat
If you have mysql/mariadb installed then you could try:
- Stopping zm and mysql/mariadb
Code: Select all
systemctl stop zoneminder
systemctl stop mysqld
systemctl stop mariadb
- Renaming or moving the folder /var/lib/mysql to keep it safe
Code: Select all
mv /var/lib/mysql /var/lib/mysql.bak
- Copying the old /var/lib/mysql folder over from the SD card.
Code: Select all
cp -pR /old/var/lib/mysql /var/lib/
- Starting mysql/mariadb
Code: Select all
systemctl start mysql
systemctl start maraidb
- Exporting the old ZM database
Code: Select all
mysqldump -u oldzmuser -p oldzmdbname --no-create-db > old_zm_db.sql
(adjust for your user and database name, and enter the old ZM user's database password when prompted)
Then do the same thing again in reverse to restore the current mysql data: Shut down the database; move, delete or rename /var/lib/mysql; copy or rename the original saved one back to its old place; start the database server:
Code: Select all
systemctl stop mysql
systemctl stop mariadb
rm -fR /var/lib/mysql
mv /var/lib/mysql.bak /var/lib/mysql
systemctl start mysql
systemctl start mariadb
Then create a new database and import the old tables into it:
Code: Select all
mysql -u zmuser -p
create database zm_old;
use zm_old;
source old_zm_db.sql;
exit;
I haven't actually tried this and there may be missed steps or easier ways to do it but something along those lines should work. You''re probably going to need add
sudo to quite a bit of that as well unless you're root,
Re: Get old confuguration from SD card?
Posted: Sun Dec 19, 2021 6:36 am
by david1234
Thank you very much for the help!