How to change Events path

Forum for questions and support relating to the 1.25.x releases only.
Locked
frankge973
Posts: 21
Joined: Fri Jan 27, 2012 2:28 pm

How to change Events path

Post by frankge973 »

I tried to change the events path without success.
In options I left 'Events'
and in the original folder of Events I created a sym link with ln command to new path on another hard drive.
But the events aren't recorded and IP camera's address in list are in orange colour. Why?
Thanks.
PacoLM
Posts: 971
Joined: Wed Dec 02, 2009 9:55 pm
Location: Spain

Re: How to change Events path

Post by PacoLM »

mount external drive to store events:
mkdir /zmdisk
mount /dev/sdc1 /zmdisk
mkdir /zmdisk/events /zmdisk/images /zmdisk/temp
rm -rf /usr/share/zoneminder/events
rm -rf /usr/share/zoneminder/images
rm -rf /usr/share/zoneminder/temp
ln -s /zmdisk/events /usr/share/zoneminder/events
ln -s /zmdisk/images /usr/share/zoneminder/images
ln -s /zmdisk/temp /usr/share/zoneminder/temp

Be careful in the rm -rf steps, if you already have events, images, etc, first copy the complete directories to the new hard drive.

Hope it helps,

PacoLM

After more than 15 years, no longer using ZM as surveillance system.
Now in the dark side, using a commercial system...
Mr.Ziggy
Posts: 16
Joined: Thu Dec 17, 2009 7:34 am

Re: How to change Events path

Post by Mr.Ziggy »

FYI: You haven't mentioned your distro. For Ubuntu, locations are different, and I struggled a long time until I came upon someone else's post about using FSTAB. For an odd Ubuntu reason, symlinks weren't working properly and I had to use FSTAB to make it all work out. From the link:



fstab could allow you to bind-mount an alternate location:
/dev/sdX1 /otherdrive ext3 defaults 0 2 /otherdrive/zoneminder/images /var/cache/zoneminder/images none defaults,bind 0 2 /otherdrive/zoneminder/events /var/cache/zoneminder/events none defaults,bind 0 2
or in some cases,
/otherdrive/zoneminder/images /usr/share/zoneminder/images none defaults,bind 0 2 /otherdrive/zoneminder/events /usr/share/zoneminder/events none defaults,bind 0 2
or if you have a separate partition for each:
/dev/sdX1 /var/cache/zoneminder/images ext3 defaults 0 2 /dev/sdX2 /var/cache/zoneminder/events ext3 defaults 0 2
Locked