frigate icon indicating copy to clipboard operation
frigate copied to clipboard

Allow clip deletion/rotation to occur at specified time each day

Open eatoff8 opened this issue 4 years ago • 20 comments

Can we please have the option to delete old clips once a day at a set time? Deletion of old clips every minute is keeping drives spun up in unraid

For reference -https://github.com/blakeblackshear/frigate/issues/2343

eatoff8 avatar Dec 02 '21 14:12 eatoff8

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 01 '22 21:01 stale[bot]

This one isnt stale, would still like some attention please

eatoff8 avatar Jan 07 '22 04:01 eatoff8

Is this still on the radar? I can see my drive where the old frigate clips are stored beïng turn on allot of the times because of deleting the clips. Would like to have an option to only run this once a day.

de-Techneut avatar Jun 10 '22 19:06 de-Techneut

Is this still on the radar

If it is pinned then it is on the roadmap

NickM-27 avatar Jun 10 '22 19:06 NickM-27

Also, not at a specific time each day, but using the current version the recordings cleanup can be limited to once per day:

# Optional: Record configuration
# NOTE: Can be overridden at the camera level
record:
  # Optional: Number of minutes to wait between cleanup runs (default: 60)
  # This can be used to reduce the frequency of deleting recording segments from disk if you want to minimize i/o
  expire_interval: 2480

NickM-27 avatar Jun 10 '22 19:06 NickM-27

I will note here, I was changing around some of my camera recording modes, and setting the expire_interval at the individual camera level doesnt seem to work. I have 5 cameras all set individually to the same expire interval at 1440 minutes (once per day) but i could see my disks spin up every hour. Changing back to a global setting appears to have rectified, but will monitor over the next few hours to confirm.

eatoff8 avatar Jul 05 '22 02:07 eatoff8

I noticed this has gone stale and been revived a few times it seems to be a few years old is this something we can expect? its keeping disks spinning and wasting alot of electricity

charettepa avatar Nov 02 '25 00:11 charettepa

If you want to reduce your disk spin up you can simply reduce the recording cleanup interval. I have mine set to 24 hours for this very reason. No disks spinning up issues at all.

NickM-27 avatar Nov 02 '25 00:11 NickM-27

that would be great how can you do this is there a variable for it?

i think thats exactly what i am looking for

charettepa avatar Nov 02 '25 00:11 charettepa

I put the config above in this thread, it is also in the documentation

NickM-27 avatar Nov 02 '25 00:11 NickM-27

thanks. this only applies to recordings and not snapshots/clips correct?

charettepa avatar Nov 02 '25 00:11 charettepa

Correct

NickM-27 avatar Nov 02 '25 00:11 NickM-27

thank you so much Nick any ideas on how long to have the setting for snapshots and clips

charettepa avatar Nov 02 '25 00:11 charettepa

Not specifically. I'd still recommend just leaving your /clips (which is just images) on the SSD. Because even if you changed the retention interval you'll still spin up the disks any time one of the images is viewed in the WebUI which could happen for various screens.

NickM-27 avatar Nov 02 '25 00:11 NickM-27

@NickM-27 I beleive i see what has happened and why I did not notice the 5 minute intervals before I have reconstructed a few times until getting to here I believe I never had more than 30 days (my retention period) previously now that there is more than 30 days it is deleting every 5 minutes

I have since created a separate folder on my SSD pool and map /clips to it for now, until there is a fix/change

this is working and disks no longer spin up

charettepa avatar Nov 02 '25 18:11 charettepa

what is the retention period of clips? is it the same as the recordings

i seem to have older ones (more than 30 days) that are not deleting

charettepa avatar Nov 03 '25 14:11 charettepa

clips is simply a collection of different images. Snapshots have a retention period of their own in the config. Thumbnails are whichever is longer, review items or snapshots, and review items are mapped to recordings.

NickM-27 avatar Nov 03 '25 14:11 NickM-27

@NickM-27 I would like first of all to thank you for your very quick replies Thank you so much

just to remove any confusion are you saying there IS a separate config for clips (thumbs/review/preview etc..) or they are tied to the related recording type (record/event/alert)

from above, it seems like they are separate but snapshot is separate

charettepa avatar Nov 03 '25 14:11 charettepa

each folder in clips is tied to a different retention depending on what feature it relates to

NickM-27 avatar Nov 03 '25 14:11 NickM-27

is there anything other than (retain/detections/alerts) have i missed setting something?

charettepa avatar Nov 03 '25 16:11 charettepa