Recording outside of working directory

Forum for questions and support relating to the 1.24.x releases only.
Post Reply
Mad Professor
Posts: 106
Joined: Wed Dec 15, 2010 11:20 am
Location: Isle Of Wight, UK

Recording outside of working directory

Post by Mad Professor » Wed Jun 01, 2011 5:46 pm

Good Day All.

Can someone please advice me to what would be the best way to Record outside of the zoneminder default folder?

My current setup records eveything to "/var/cache/zoneminder/events"

I have just fitted a new HDD, and it is mounted to "/media/CCTV"

So I no longer what to record to "/var/cache/zoneminder/events" but instead record it to "/media/CCTV".

What is the best way to do this?

Thanks for your time.

Best Regards.

DREMA
Posts: 162
Joined: Fri Dec 12, 2008 2:39 am
Location: México

Re: Recording outside of working directory

Post by DREMA » Wed Jun 01, 2011 6:10 pm

Just create a symlink to your new directory.

Backup you original event folder

Code: Select all

$ mv /usr/share/zoneminder/events /usr/share/zoneminder/eventsbackup
Create the symlink

Code: Select all

$ ln -s /media/CCTV /usr/share/zoneminder/events
Check the directory

Code: Select all

ls -hal /usr/share/zoneminder/
events should point to /media/CCTV

One thing, just be careful on not starting zoneminder with your harddrive unmounted, because zm run a consitensy check every few minutes, and if your directory is not present, zmaudit.pl won't find the files and it'll delete the events from the database.
Last edited by DREMA on Wed Jun 01, 2011 8:30 pm, edited 1 time in total.
Just... enjoy life! :D

User avatar
zoneminder
Site Admin
Posts: 5220
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Re: Recording outside of working directory

Post by zoneminder » Wed Jun 01, 2011 7:44 pm

I think

Code: Select all

ls -n
probably should be

Code: Select all

ln -s
:lol:
Phil

DREMA
Posts: 162
Joined: Fri Dec 12, 2008 2:39 am
Location: México

Re: Recording outside of working directory

Post by DREMA » Wed Jun 01, 2011 8:30 pm

Hahaha right, damn dyslexia.

Corrected.
Just... enjoy life! :D

Mad Professor
Posts: 106
Joined: Wed Dec 15, 2010 11:20 am
Location: Isle Of Wight, UK

Re: Recording outside of working directory

Post by Mad Professor » Sat Jun 11, 2011 12:03 pm

Thanks for your replies.

I am now trying to hardlink zoneminder to my spare drive.

Here is what I have put in my "/etc/fstab"

Code: Select all

/dev/sdb1		/media/CCTV			ext4	defaults	0	2
/media/CCTV/images	/var/cache/zoneminder/images	none	defaults,bind	0	2
/media/CCTV/events	/var/cache/zoneminder/events	none	defaults,bind	0	2
/media/CCTV/temp	/var/cache/zoneminder/temp	none	defaults,bind	0	2
Now when I load the ZoneMinder front page is shows "Disk: -1%" and will not record to disk.

I guess I have missed something, can you please advice.

Flasheart
Posts: 345
Joined: Thu Jul 06, 2006 2:27 pm

Re: Recording outside of working directory

Post by Flasheart » Sun Jun 12, 2011 8:11 am

Read http://www.zoneminder.com/wiki/index.ph ... Hard_Drive

Symlinks are not detected by the debian installer packages, so will be removed and recreated. zmaudit will then not be able to find the files and will kill all the events in your database.

If using debian or ubuntu, do not use symlinks for this!

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests