pyro-api icon indicating copy to clipboard operation
pyro-api copied to clipboard

[storage] Set up automatic deletion of old media

Open frgfm opened this issue 4 years ago • 6 comments

For now, the media that are uploaded to the bucket are stored indefinitely. But in the long-term, we need to erase those to avoid filling up the disk.

If that's alright with everyone, I suggest setting a MEDIA_PERSISTENCY value in the config (default 30-60days).

What do you think? cc @jeanpasquier75 @florianriche @fe51

frgfm avatar Mar 15 '21 09:03 frgfm

Hi there,

This is indeed a good idea ! Moreover, with regard to the CNIL, it is important to define a storage period for our images.

Concretely, how do you want to implement it ?Is the concept to set up a CRON on a backend script deleting old media ?

About the storage period, is 30 days enough time to potentially do training sessions on vision side ?

fe51 avatar Mar 18 '21 09:03 fe51

Good question, I'm not sure how we could do this :man_shrugging:

We'll let the vision team know, but let's work with the maximum legal duration allowed to give them the best flexibility :+1:

frgfm avatar Mar 18 '21 16:03 frgfm

FYI, moving this to a later release, since the problem won't be critical before our first live alerts

frgfm avatar Mar 18 '21 16:03 frgfm

FYI found a service that could help us do that https://posthook.io/ (found here https://free-for.dev/, sharing because it's nice)

florianriche avatar Apr 19 '21 17:04 florianriche

Wrapping my way around this, apart from our current process of doing it manually, the only viable way we could do this is with a cron job :)

Not a priority since we have limited traffic, I'll move this to a later release

frgfm avatar Jun 16 '22 16:06 frgfm

I'd like a second opinion on this @MateoLostanlen but I think we can close this? (Those images are expected to be kept for at least a year for fire fighters, but it's older, the binary image may be removed from the bucket but we keep the "detection" and "sequence" record right?)

frgfm avatar Jan 17 '25 11:01 frgfm