Page 1 of 1
Recording outside of working directory
Posted: Wed Jun 01, 2011 5:46 pm
by Mad Professor
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.
Re: Recording outside of working directory
Posted: Wed Jun 01, 2011 6:10 pm
by DREMA
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
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.
Re: Recording outside of working directory
Posted: Wed Jun 01, 2011 7:44 pm
by zoneminder
I think
probably should be
Re: Recording outside of working directory
Posted: Wed Jun 01, 2011 8:30 pm
by DREMA
Hahaha right, damn dyslexia.
Corrected.
Re: Recording outside of working directory
Posted: Sat Jun 11, 2011 12:03 pm
by Mad Professor
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.
Re: Recording outside of working directory
Posted: Sun Jun 12, 2011 8:11 am
by Flasheart
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!