Crash / Burn / Recover - Can I?

Forum for questions and support relating to the 1.30.x releases only.
Post Reply
AnotherBrian
Posts: 100
Joined: Tue Jul 27, 2010 6:36 am

Crash / Burn / Recover - Can I?

Post by AnotherBrian » Mon Feb 19, 2018 8:48 pm

I want to generate a video from zoneminder archive data on a trashed ubuntu 17.04 / zoneminder 1.30 system.
I can't boot up the drive and stupid me didn't use a logical drive system - everything is in a boot partition.

17.04 is no longer supported by ubuntu and there is a warning around that warns against using 17.10.
Okee Doke - one step back and now I got 16.04 / 1.30 running on a new drive.
Is there any way to get to the old archived data and generate a video? I would think mounting the old mysql/apache/zoneminder directories over the new system directories would be dangerous

User avatar
iconnor
Posts: 822
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Crash / Burn / Recover - Can I?

Post by iconnor » Mon Feb 19, 2018 8:49 pm

That should work fine actually.

bbunge
Posts: 2436
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Crash / Burn / Recover - Can I?

Post by bbunge » Tue Feb 20, 2018 2:16 am

I feel the tricky part would be the zm database. I've used backup copies (dump) of the database to reinstall Zoneminder on a fresh system. I suppose it is possible to copy the MySQL zm files (located in /var/lib/mysql) to another drive. Not sure what you would have to do to get the database to work. Keep copies! Copy the /var/cache/zoneminder/*.* as well. Keep copies!! Remember if something goes wrong with the database the events records and/or images will be deleted. Keep Copies!!!

Ubuntu 17.04 should be still out there if you need to create a recovery disk. You may want to try to recover the existing drive. Make a copy if it can be read. Clonezilla may be able to transfer everything to another drive and if Clonezilla can read the old drive it can be used to make an image you can restore if your copies get messed up.

Did I say to make copies????
Best of luck... Of course you know Google is your friend...

AnotherBrian
Posts: 100
Joined: Tue Jul 27, 2010 6:36 am

Re: Crash / Burn / Recover - Can I?

Post by AnotherBrian » Mon Feb 26, 2018 10:32 pm

Ok - this worked. User ids and Group Ids on the defective drive won't match the conventions on the new drive. mount --bind comes to mind but this won't work with ext4 system. Hence bindfs is the tool to use. Recall we have a new live drive with a new working zoneminder and we have an old drive with the data. We want the new zoneminder to use the old data.

First mount the drive. I used the gui from disks which mounted the old drive into /media/<myuserID>/<diskUUID>

Become root

Code: Select all

sudo su
Install bindfs

Code: Select all

apt install bindfs
Stop services

Code: Select all

service zoneminder stop
service mysql stop
service apache2 stop 
Set current directory to make life easy

Code: Select all

cd  /media/<myuserID>/<diskUUID>
Mount the file systems using the appropriate user and group ids.

Code: Select all

bindfs -o nonempty -u www-data -g www-data ./var/cache/zoneminder /var/cache/zoneminder
bindfs -o nonempty -u mysql -g mysql ./var/lib/mysql  /var/lib/mysql
Now start the services

Code: Select all

service start mysql
service start apache2 
service start zoneminder
If you reboot the system you will be back fully on the new zoneminder and all that old data will be unmounted.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests