Difference between revisions of "Ticket Attachment Pruning"
(Created page with "==Introduction== The prune ticket attachments feature automatically deletes and purges ticket attachments following a set amount of time of inactivity following closure of a...") |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | Pruning ticket attachments automatically deletes and purges ticket attachments following a set length of inactivity after closure of a ticket. This provides security benefits by only storing files for the shortest amount of time necessary and helps reduce disk storage requirements for file attachments. | |
− | + | Attachment pruning removes file attachments from the configured storage location for attachments (local disk or an Amazon S3™-compatible storage provider). After removal of attachments, when viewing a ticket, both admins and clients can view a list of attachment filenames. The system will annotate the filenames with a notice indicating their removal due to inactivity in the ticket. You cannot recover pruned ticket attachments. | |
− | |||
− | |||
− | |||
− | |||
==One-Off Pruning== | ==One-Off Pruning== | ||
− | You can perform a one- | + | You can perform a one-time on-demand prune of ticket attachments using the tools at '''Utilities > System > [[System Cleanup]]'''. |
− | To do this | + | To do this. |
− | # | + | # Go to '''Utilities > System > [[System Cleanup]]'''. |
− | # | + | # For '''Prune Ticket Attachments''', select the desired date to prune tickets from. |
− | + | # Click '''Delete'''. | |
− | # Click | ||
− | <div class="docs-alert-warning"> | + | <div class="docs-alert-warning"> |
+ | The system prunes attachments in batches of 1,000 ticket attachments per batch. If the number of attachments to prune for the time period you select exceeds this, you will receive a notice that the system successfully pruned the first 1,000 but that there are additional attachments remaining. In this scenario, you must repeat the process until the system no longer advises you there are remaining attachments. | ||
+ | </div> | ||
==Automatic Pruning== | ==Automatic Pruning== | ||
− | WHMCS | + | You can configure WHMCS to perform automated ticket attachment pruning. |
− | To do this | + | To do this: |
− | # | + | # Go to '''Configuration (<i class="fa fa-wrench" aria-hidden="true"></i>) > System Settings > [[Automation Settings]]''' or, prior to WHMCS 8.0, '''Setup > Automation Settings'''. |
− | # | + | # If the system requests it, confirm your admin password. |
− | # | + | # For '''Prune Ticket Attachments''' under '''Support Ticket Settings''', choose the number of months to retain attachments following closure of a ticket (minimum one month). |
− | + | # Click '''Save Changes'''. | |
− | # | ||
− | <div class="docs-alert-info"> | + | <div class="docs-alert-info"> |
+ | The [[Crons|system cron]] performs automatic ticket pruning every hour. | ||
+ | </div> | ||
===Batch Processing=== | ===Batch Processing=== | ||
− | + | If you enable automatic attachment pruning and the number of attachments to prune exceeds 1,000 (the number in each pruning batch), it may take several runs to remove all of the attachments that match the selected criteria. | |
− | |||
− | |||
− | For large installations with a high volume of ticket attachments, you | + | For large installations with a high volume of ticket attachments, you can run the ticket attachment pruning task more frequently than hourly. To do this, configure the following cron command: |
<div class="source-cli">php crons/cron.php -vvv do --AutoPruneTicketAttachments</div> | <div class="source-cli">php crons/cron.php -vvv do --AutoPruneTicketAttachments</div> | ||
− | You can configure | + | You can configure this command to run as frequently as you wish, but we recommend no more than every 5 minutes. |
Latest revision as of 18:42, 9 May 2022
Pruning ticket attachments automatically deletes and purges ticket attachments following a set length of inactivity after closure of a ticket. This provides security benefits by only storing files for the shortest amount of time necessary and helps reduce disk storage requirements for file attachments.
Attachment pruning removes file attachments from the configured storage location for attachments (local disk or an Amazon S3™-compatible storage provider). After removal of attachments, when viewing a ticket, both admins and clients can view a list of attachment filenames. The system will annotate the filenames with a notice indicating their removal due to inactivity in the ticket. You cannot recover pruned ticket attachments.
One-Off Pruning
You can perform a one-time on-demand prune of ticket attachments using the tools at Utilities > System > System Cleanup.
To do this.
- Go to Utilities > System > System Cleanup.
- For Prune Ticket Attachments, select the desired date to prune tickets from.
- Click Delete.
The system prunes attachments in batches of 1,000 ticket attachments per batch. If the number of attachments to prune for the time period you select exceeds this, you will receive a notice that the system successfully pruned the first 1,000 but that there are additional attachments remaining. In this scenario, you must repeat the process until the system no longer advises you there are remaining attachments.
Automatic Pruning
You can configure WHMCS to perform automated ticket attachment pruning.
To do this:
- Go to Configuration () > System Settings > Automation Settings or, prior to WHMCS 8.0, Setup > Automation Settings.
- If the system requests it, confirm your admin password.
- For Prune Ticket Attachments under Support Ticket Settings, choose the number of months to retain attachments following closure of a ticket (minimum one month).
- Click Save Changes.
The system cron performs automatic ticket pruning every hour.
Batch Processing
If you enable automatic attachment pruning and the number of attachments to prune exceeds 1,000 (the number in each pruning batch), it may take several runs to remove all of the attachments that match the selected criteria.
For large installations with a high volume of ticket attachments, you can run the ticket attachment pruning task more frequently than hourly. To do this, configure the following cron command:
You can configure this command to run as frequently as you wish, but we recommend no more than every 5 minutes.