Can you configure frigate automatically delete archives when disk usage reaches a certain threshold? #20262
-
Hi there, I'm reviewing this: https://docs.frigate.video/configuration/record#common-recording-configurations I'm running frigate inside a VM with 100GB disk and today it is at 92%. My goal is to keep detections and archives as much as possible, but not have to worry it will all fall down if the disk hits 100%. I'm happy to do use an external technique if this is not something frigate supports natively using a cron job or something. Is there a way to troubleshoot the configuation so I don't run out of disk? Is there a way to say "retain for 3 days UNLESS you hit 95% and then delete this or that." I have this configuration right now and worry it is going to crash when the disk gets to 100%
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Frigate does have built-in emergency storage cleanup to prevent disk space issues(1). When there is less than an hour of storage remaining, Frigate automatically deletes the oldest 2 hours of recordings(1). This provides automatic protection against running out of disk space. However, Frigate doesn't currently support configurable retention by disk usage percentage or size thresholds. The retention system is based on time periods (days) only(1)(2). There is an open feature request for configurable retention by size, but this hasn't been implemented yet(3). For your current configuration with 7 days of continuous recording (
You could also implement a more conservative approach by setting continuous recording to fewer days and using longer retention for alerts and detections(1):
The emergency cleanup should prevent crashes when disk space is critically low, but it's still better to configure retention periods that fit within your available storage capacity(1). 📚 Sources: Have another question? Just tag @inkeep. |
Beta Was this translation helpful? Give feedback.
Frigate does have built-in emergency storage cleanup to prevent disk space issues(1). When there is less than an hour of storage remaining, Frigate automatically deletes the oldest 2 hours of recordings(1). This provides automatic protection against running out of disk space.
However, Frigate doesn't currently support configurable retention by disk usage percentage or size thresholds. The retention system is based on time periods (days) only(1)(2). There is an open feature request for configurable retention by size, but this hasn't been implemented yet(3).
For your current configuration with 7 days of continuous recording (
mode: all
), you're storing all video segments regardless of activity…