Get old confuguration from SD card?

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
david1234
Posts: 96
Joined: Wed Jun 26, 2019 12:24 pm

Get old confuguration from SD card?

Post 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 ,
Magic919
Posts: 1381
Joined: Wed Sep 18, 2013 6:56 am

Re: Get old confuguration from SD card?

Post by Magic919 »

If you can grab the MySQL database, it'll have most of what you'll need.
-
david1234
Posts: 96
Joined: Wed Jun 26, 2019 12:24 pm

Re: Get old confuguration from SD card?

Post by david1234 »

I think I can :-)
I get access to the all SD
can you explian to me what to do ?

Thanks,
User avatar
kitkat
Posts: 193
Joined: Sun Jan 27, 2019 5:17 pm

Re: Get old confuguration from SD card?

Post 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,
david1234
Posts: 96
Joined: Wed Jun 26, 2019 12:24 pm

Re: Get old confuguration from SD card?

Post by david1234 »

Thank you very much for the help!
Post Reply