Shredding attachments based on date

Hi all,

I’d like to remove attachments older than x months from the database
and thought probably rt-shredder is the tool for this (its not something
I’ve used before). Having googled this a bit and checked “rt-shredder
–plugin help-Attachments” for instructions it looks like it may not be
possible to use date, can anyone advise? Otherwise I guess I need to
delete them directly from MySQL, not sure if this will make a mess of RT
though,

thanks for any help, Andy.

you can shred based on sql query, such as

./rt-shredder --plugin “Tickets=query,Queue = ‘Support’ and Status =
‘deleted’;limit,5000” --sqldump /root/bup9.sql --force

…so you can change the query as you see fit.On 19-Dec-16 2:38 PM, Andy Smith wrote:

Hi all,

I’d like to remove attachments older than x months from the database
and thought probably rt-shredder is the tool for this (its not
something I’ve used before). Having googled this a bit and checked
“rt-shredder --plugin help-Attachments” for instructions it looks like
it may not be possible to use date, can anyone advise? Otherwise I
guess I need to delete them directly from MySQL, not sure if this will
make a mess of RT though,

thanks for any help, Andy.

Jon ‘Boli’ Copeland
Systems Engineer
IT Sales & Services Ltd
All sales enquiries : sales@itss.co.tz
All support enquiries : support@itss.co.tz
Emergencies Only : +255 (0) 685 374780

you can shred based on sql query, such as

./rt-shredder --plugin “Tickets=query,Queue = ‘Support’ and Status =
‘deleted’;limit,5000” --sqldump /root/bup9.sql --force

…so you can change the query as you see fit.

Hi Jon,

thanks for your reply, yes I’d seen this but this is using the tickets
plugin so I believe will shred the entire ticket. I want to use the
Attachments plugin, which according to the documentation has no SQL
query support, you appear to only be able to select based on name or
size. Or am I wrong?

cheers, Andy.