[Support]: canned solution to clean up "other" storage? #21095
Replies: 1 comment
-
|
Based on the available documentation, there isn't a built-in Frigate tool specifically designed to remove orphaned files from the storage directory that aren't tracked in the database(1). The documented approach for cleaning up Frigate data involves either:
Neither of these approaches directly addresses your situation where you want to remove files from disk that aren't in the database while preserving database entries for valid files. For your specific use case with 1.45 TiB of "Other" storage, you may need to create a custom script that:
Before proceeding, ensure you have backups of both your database and media files. The Frigate storage locations you should be aware of are(2):
Check out these potentially useful sources: clean up database, Installation 📚 Sources: Have another question? Just tag @inkeep. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the problem you are having
I've upgrade Frigate a few times over the years, and earlier this year I solved an issue (which I caused for myself) by just starting over. However, I didn't wipe the storage before doing so. As such, I have a bunch of cruft left over which isn't in the database. As discussed in #20563, there's a way to purge the database of stored elements which are gone, but I've not been able to find a solution for going the other way - I want to remove stuff from the Frigate data directory which isn't know to the database. The Frigate storage metrics say there is about 1.5 TB of stuff on that volume which isn't Frigate's. I don't want to delete everything in there, but I think the data directory should definitely be entirely owned by Frigate. So I think maybe what I need to do is put together a small script which lists files under data and checks for each one in the database, but before I start writing that script, I thought I should check to see if there's a "better" (aka "easier") option already available. 😄
Version
0.16.1-e664cb2
What browser(s) are you using?
No response
Frigate config file
N/ARelevant Frigate log output
Relevant go2rtc log output
FFprobe output from your camera
Frigate stats
N/AInstall method
Docker Compose
docker-compose file or Docker CLI command
Object Detector
TensorRT
Network connection
Wired
Camera make and model
Hikvision, mostly
Screenshots of the Frigate UI's System metrics pages
Any other information that may be helpful
No response
Beta Was this translation helpful? Give feedback.
All reactions