Auto delete files

koushik269

Cadet
Joined
Jun 16, 2023
Messages
2
Hello im new to truenas

Just wondering if there is a way to delete old files like camera recording only when the storage is 90% full so
When storage is 90% full it will auto delete old recordings to free up 15% space and next time it get 90% same thing will happen again automatically
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Hello im new to truenas

Just wondering if there is a way to delete old files like camera recording only when the storage is 90% full so
When storage is 90% full it will auto delete old recordings to free up 15% space and next time it get 90% same thing will happen again automatically
This is something you'd have to write your own script for (and maybe run as a cronjob) or find someone else's script and test thoroughly. Automatically deleting user files is something that generally people don't want to touch with a 10' pole for liability reasons. :)
 

koushik269

Cadet
Joined
Jun 16, 2023
Messages
2
This is something you'd have to write your own script for (and maybe run as a cronjob) or find someone else's script and test thoroughly. Automatically deleting user files is something that generally people don't want to touch with a 10' pole for liability reasons. :)
ok you saying it can be done through cronjob well you might not recommend doing it but it can be done with cronjob and maybe shell or bash scripting ?
 

somethingweird

Contributor
Joined
Jan 27, 2022
Messages
183
ok you saying it can be done through cronjob well you might not recommend doing it but it can be done with cronjob and maybe shell or bash scripting ?

Yes - it can be done.

it's just that no one here will help you because they don't want to be responsible for incorrectly deleting files.
 
Top