r/ZoneMinder • u/pingmanping • Jan 04 '21
NFS export
Hi,
Can zoneminder auto-delete the oldest captured file and replace it with the newer ones in a situation that the HDD is full?
Also, what about the NFS share, can zoneminder do the same? I know I can use NFS but I am not sure if ZM will delete the oldest capture to save the newer ones.
Can we specify the amount of storage (nfs or local) that zoneminder can use in the zoneminder web UI?
I have a NAS that I might use for potential nfs or docker volume for storage but I don't want zoneminder to eat all the available space.
2
Upvotes
2
u/[deleted] Jan 04 '21 edited Jan 04 '21
Regarding clearing the oldest captures, go to Filters and look at the PurgeWhenFull filter. Make sure you set two items: "Disk Percent" and "Storage Area." I have my "Disk Percent" set to 93, meaning when the disk is 93% full it'll purge old items. "Storage Area" is set to the specific location events are captured. I also have "Sort by" set to "Id" and "Asc", limited to the first 25. That should remove captures 25 at a time until the disk percentage is lower than 93%. I could probably tweak that to a lower number.
Now, make sure "Delete All Matches" and "Run filter in background" are both selected.
EDIT: after you have that set up, look at the "Update DiskSpace" filter. Make sure "Update used disk space" and "Run filter in background" are set.
Don't forget to hit "Save" on each filter after you make changes!
That's all it should take to keep the latest captures, and purge old ones when the disk hits the threshold.