Moving Attachments from DB - Max Size

HI All,
Now that I was able to get through the whole attachment table by doing it in a loop of batches. I have found that it only moved attachment that were greater then the default size. I would like to re-run the move with a max size of 1MB. I update the RT_SiteConfig with Set($ExternalStorageCutoffSize, 110241024); but when I re-ran the plugin (rt-externalize-attachments) to migrate it seems to only scan new tickets that were created since it was last run. Is there a way to re-scan the attachment table with the lowered max file size value?

Any ideas on how to get the script to re-scan the attachment table for the re scanning for a smaller file size?


I believe you’d need to remove the ExternalStorage attribute from the Attributes table

1 Like

Hi knation,
I must be missing something, as I don’t see that attribute in the Attributes table?

Any help on this would be appreciated.


Looking at the code it seems that’s how RT determines where to start, so I would definitely expect it to be there if you ran the externalize attachments script.

I’ve just tried this on a non-production system. Deleting the ExternalStorage record from the Attributes table as below then re-running rt-externalize-attachments caused it to externalise attachments exceeding my reduced cutoff size. So far, I haven’t found any problems.

delete from Attributes where Attributes.Name='ExternalStorage';

1 Like