Define the criteria for archiving records by creating an archive rule.

Before you begin

Because you can define multiple archive rules for a table, verify any existing archive rules to avoid potential conflicts. For example, if there's a rule for archiving records older than six months, creating another rule to archive records older than three months could cause a conflict. In such cases, either rule could potentially run, each archiving records under different conditions.

Role required: admin

Procedure

  1. Access the archive rule form in one of the following ways.
    OptionSteps
    Using a data management policy
    1. Navigate to All > System Data Management > Data Management Policies.
    2. Select the data management policy for the table with records that you want to archive.
    3. In the Archive Rules related list, select New.
    Using the Archive Rules module
    1. Navigate to All > System Archiving > Archive Rules.
    2. Select New.
  2. On the form, fill in the fields.
  3. (Optional) Estimate the number of records to archive by selecting the Recalculate Archive Estimate related link.
    The estimate only includes primary records and excludes any related records added to the archive rule. The estimate helps you determine if the archive rule affects the number of records you expect it to. If the estimate is too high or low, change the archive rule conditions accordingly.
    The updated count appears in the Record estimate field.
  4. Select Submit.

Activate an archive rule

Preview the records that you want to archive, and then activate an archive rule.

Before you begin

Role required: admin

About this task

You must activate the archive rule and its corresponding data management policy for the archive rule to run.

The sample archive rules are inactive by default.

Procedure

  1. Access the archive rule that you want to activate in one of the following ways.
    OptionSteps
    Using a data management policy
    1. Navigate to All > System Data Management > Data Management Policies.
    2. Select the data management policy for the table with records that you want to archive.
    3. In the Archive Rules related list, select the archive rule that you want to activate.
    Using the Archive Rules module
    1. Navigate to All > System Archiving > Archive Rules.
    2. Select the archive rule that you want to activate.
  2. (Optional) Estimate the number of archive records by selecting the Recalculate Archive Estimate related link.
    The estimate only includes primary records and excludes any related records added to the archive rule. The estimate helps you determine if the archive rule affects the number of records that you expect. If the estimate is too high or low, change the archive rule conditions accordingly.
    The updated count appears in the Record estimate field.
  3. Activate the archive rule by selecting the Active check box.
  4. (Optional) Archive records immediately by selecting the Run Archive Now related link.
    The Run Archive Now related link is only available if the corresponding data management policy is activated.

Result

Records that meet the archive rule criteria are archived during the next archive run.

What to do next

View the archived records by navigating to All > System Archiving > Archive Tables and selecting the module for the archived table, for example, Archive Incidents.

Create a destroy rule

Delete archived records and related records after a specified amount of time.

Before you begin

Role required: admin

About this task

You can associate a destroy rule with any archive rule in a data management policy.

If you need to amend the destroy rule properties running against your archived data, see Archive rule and destroy rule properties.

Procedure

  1. On the archive rule form, select Create Destroy Rule.
  2. In the Destroy Rule tab, fill out the fields.
    Field Description
    Active Option to activate the destroy rule.
    Destroy Related Records Option to automatically destroy related records associated with the archived records.
    Note: Peripheral records, which include records in the Journal Entry [sys_journal_field], Attachment [sys_attachment], and Sys Audit [sys_audit] tables are deleted automatically, even if you decide to preserve related records.
    Archive Duration Specify the amount of time that records stay in the archive table before the system deletes them.
  3. (Optional) Estimate the number of archived records marked for deletion by selecting the Recalculate Destroy Estimate related link.
  4. Select Submit.

Result

Records that have been archived longer than the archive duration value are destroyed when the scheduled job runs. You can verify the progress by checking the archive destroy log.