I have a filter to clean up the storage and works but I had tried to find a way to stop deleting all the videos from storage once a certain limit has reached (Delete progressively from old ones, ex by ID)
The limit seems not working or I miss something. I tried to follow the docs before writing this.
In this example had set a limit for max 3 files on ID order and just list the matches
using firefox browser.
I had put a simple rule to test the limit first:
and list all files, should give me only 3
my current filter for purge
Filter -- limit the amount of deleted files issue
Filter -- limit the amount of deleted files issue
Last edited by busymind on Thu Apr 10, 2025 2:41 am, edited 9 times in total.
Re: Filter limit the amount of delete
This is with Debug My understanding in sql is, take the column ID and order asc and limit the results to 1 (in this example)
Syntax seems ok ... I do not know what sql server receive from this syntax
the filter
Syntax seems ok ... I do not know what sql server receive from this syntax
Code: Select all
mariaDB:
SELECT *, M.Name AS MonitorName, M.DefaultScale
FROM Monitors AS M INNER JOIN Events AS E ON (M.Id = E.MonitorId)
WHERE E.Archived = '0' AND TRUE /*DiskPercent*/ AND E.StorageId = '2' ORDER BY Id ASC LIMIT 1;
Re: Filter -- limit the amount of deleted files issue
Here is my working filter that does the following:
- Deletes only unarchived files.
- Deletes from "NAS" storage when more than 89% is occupied
- Deletes from the DB only those files that are in the file system.
- Deletes 300 files at a time (I set a high value here when I needed to quickly clear critical space, but this value remained
)
- Start interval is 60 seconds.
- Deletes only unarchived files.
- Deletes from "NAS" storage when more than 89% is occupied
- Deletes from the DB only those files that are in the file system.
- Deletes 300 files at a time (I set a high value here when I needed to quickly clear critical space, but this value remained

- Start interval is 60 seconds.
- Attachments
-
- Filter.jpg (167.46 KiB) Viewed 874 times
Re: Filter -- limit the amount of deleted files issue
If I understand correctly there's is no function to keep some videos on disk in case something happens and not archived and needed to be retrieved. At the end of the disk space everything will be gone (except archived ones). That limit seems to be for other reason - I do still not get it. Also that version does not seems similar to mine.
Re: Filter -- limit the amount of deleted files issue
Important files that should not be deleted - you should mark as archived.
This is the standard version of ZM, but with a new sidebar. This sidebar is under development.
This is the standard version of ZM, but with a new sidebar. This sidebar is under development.
Re: Filter -- limit the amount of deleted files issue
In term of compliance, nobody may archive videos (watching and archive them for some reason), if something happens on surveillance site (and later needed a proof) and space is almost full the owner will loose those videos.
What I trying to say the limit (as I had understand it) could be useful to delete only the first X number of files (videos), always keep a poll of videos for later retrieval, period which is of course depending of the size of the storage.
Anyway thank you L.A.
What I trying to say the limit (as I had understand it) could be useful to delete only the first X number of files (videos), always keep a poll of videos for later retrieval, period which is of course depending of the size of the storage.
Anyway thank you L.A.
Re: Filter -- limit the amount of deleted files issue
My configured filter, the screenshot of which I published, deletes exactly the oldest events. That is, everything happens as in your picture.