Overview
This article describes the process to purge attachments. The Maintenance area of the admin control panel allows you to:
- Purge Attachments
The attachments are stored in the database or the Files directory depending upon the setting at:
Admin CP > Settings > Server setting and performance > Storage location for file attachments.
To save the database space or file space, older/unwanted attachments can be purged. - Move the ticket attachments from the database to the files directory and vice-versa
- If the attachment storage location is set to the database, then over time the database size tends to increase, so you can move all the attachments stored in the database to the Files directory, and free up space.
- If the attachment storage location is set to the files directory, then you need to provide separate permissions to the files directory, and it is not feasible in some cases due to strict security policies. So, you may move all the attachments which are downloaded earlier in the files directory to the database. Also, in some cases, you do not want separate scripts implemented on your servers (due to heavy resource utilization) to take the backup of the support desk database and the files directory separately. Hence, you may move all the email attachments to the database and implement scripts to backup the database only.
Process
This utility allows you to search for attachments that match one or a set of file criteria and purge them. In order to view and manage the support desk attachments:
- Navigate to Admin CP > Maintenance > Purge Attachments.
- You will be presented with a search and criteria builder form. You can insert single or multiple search criteria by clicking on Insert Criteria. The search criteria can be based on the following fields:
- File Name: You can define a string that the search engine can search file names for (including their extension). For example, the criteria can be Any file that contains the string "zip".
- File Size: You can define a file size (in Kilobytes, where 1024 Kilobytes is equal to 1 Megabyte). For example, the criteria can be Any file that has a file size that is greater than 1024 KB.
- Creation Date: You can define a creation date for a file. For example; the criteria can be Any file that was created before 08/08/2010.
- You need to select the grouping method (AND/OR) if you are using more than one criteria fields for the search.
- If set to Match All criteria, the parser rule will only match a file if all of the criteria fields are true for that ticket (AND logic).
- If set to Match Any criteria, only one of the criteria fields needs to be true for this parser rule to match a file (OR logic)
- Once the search criteria is set, click Lookup to search all the files matching that criterion.
- Once all the files are listed which satisfy the criteria, select them all by clicking the check box in front of then and click Delete.
Note: The attachments once deleted can not be recovered, not even from the database tables. So, check and confirm the files lined up for deletion before clicking Delete.
- You will get a success message, confirming the deletion of the selected files.
Notes:
- Purging attachments remove the attachments from Tickets as well from Knowledgebase articles.
- If you wish to delete it only from Tickets, you can either upgrade your Kayako to the latest version to select the section; or just let us know; we will share the source code to be tweaked.