Repair directory structure after 'manual purge'

Forum for questions and support relating to the 1.25.x releases only.
Locked
tortoise74
Posts: 15
Joined: Fri May 04, 2012 11:34 pm

Repair directory structure after 'manual purge'

Post by tortoise74 »

Hi,
I got zoneminder v1.25 working but found that it filled up my remainging disk space 4Gb overnight. As I hadn't set-up a purgewhenfull filter yet.
Unwisely I chose to rm -rf the full directory of /var/cache/zoneminder/1/events/.
I expected zoneminder to recreate any directories needed as required. Something is not right though.
Although zoneminder records it is unable to playback.
I tried running "zmfix -a". I'm not sure what its supposed to fix but it didn't do anything for this problem.

I can just re-install as it is a new installation but I would like to understand the system better.
(any links to discussions or documentation of the design would be very useful)

Is there anyway to repair the /var/cache directory structure?
What is a easy, correct and safe way to *manually* purge parts of it when it starts to get too full?

Regards,

Bruce.
tortoise74
Posts: 15
Joined: Fri May 04, 2012 11:34 pm

Manual Purge

Post by tortoise74 »

It seems I was wrong and zoneminder does at least partially repair the cache itself.
I can happily playback events in firefox but for some reason not chrome. Though both browsers display the live feed perfectly.
christophe_y2k
Posts: 102
Joined: Mon Oct 12, 2009 8:47 am
Location: EUROPE-FRANCE-MANDELIEU

Re: Repair directory structure after 'manual purge'

Post by christophe_y2k »

Hello, after filled up hdd, depend on your system (best to separate mysql database directory and zoneminder image directory)
i need to repair mysql bdd
on my gentoo :

# /etc/init.d/zoneminder stop
# /etc/init.d/apache2 stop
# /etc/init.d/mysql stop
# myisamchk --extend-check /var/lib/mysql/zm/*.MYI
# myisamchk --recover /var/lib/mysql/zm/*.MYI
# /etc/init.d/mysql start
# /etc/init.d/apache2 start
# /etc/init.d/zoneminder start

or repair zoneminder bdd with phpMyAdmin
tortoise74
Posts: 15
Joined: Fri May 04, 2012 11:34 pm

Re: Repair directory structure after 'manual purge'

Post by tortoise74 »

Its the image directory taking up most of the space but I don't know what it is safe to delete.
I guess find . -name \*.jpg | xargs rm -f rather than rm -f is safer.
Of course that leaves the database with dangling events.

I'm sure there is a better way.
Locked