OBLYTECH Logo
OBLYTECH Logo

Data Archive Rules in the Data Management Console

An archive rule moves records that match your conditions out of a live table and into a matching archive table. You build it in the Data Management Console by defining conditions, checking an estimate, optionally adding a destroy rule and choosing how related records are handled.

What activation changes on the table

Activating a rule creates an archive table named after the primary table with an “ar_” prefix, so archiving Incident produces ar_incident. The archive table is flat: joined tables collapse into one table, and reference fields are stored as the display text they held when the record was archived. A module for the table appears under the Archive Tables list in the System Archiving application.

Each archived record is also kept as an XML copy in the shared archive log table, which holds the sys_id alongside reference display values, so it is needed to restore the record later.

Archive tables suit targeted lookups, not open-ended searching. They index the display value, the creation date and the sys_id. Look up a record number such as INC100001 or a creation date instead of an unindexed field such as priority.

Scope varies by table type. Core and custom tables can use archive rules. Configuration item records go through the CMDB Data Manager. Email is archived by activating the Email retention plugin and using the archive and destruction rules that come with it. Do not create your own archive rules on the email table.

Building the rule in the Data Management Console

An admin role is required. Start from the Overview tab by selecting the table and choosing Create rule, or from the Tables tab by selecting the table, opening its Rules tab and choosing Create rule.

Naming the rule and checking for overlaps

On the Define your rule page, choose Archive as the rule type and enter a name and description. The name appears as the display value wherever the rule is referenced.

Check the rules already attached to the table before you save. Overlapping criteria cause trouble: a rule archiving records older than six months and another archiving records older than three months both match the same older records, and either may run under its own conditions.

Defining conditions and checking the estimate

Each condition is a field, an operator and a value, such as Category is Software. Combine conditions with AND and OR, or add a condition set for different criteria. Date operators need care, because two similar phrasings select different periods. Closed, relative, before, 2, Years, ago is a rolling cut-off. Closed, on, Last 2 years selects the current and prior year instead.

Test the conditions in a list view before activating. Then select Calculate archive estimate. The estimate counts primary records and excludes related records, so adjust the conditions if the figure is not what you expected.

Auto-rearchive is optional. It sends a restored record back to the archive after an interval you set in years, days and hours.

Setting a destroy rule

The destroy step is optional. Select Destroy archived records and set the archive duration in years, days and hours. The default is one year. If all duration fields are empty or zero, archived records are destroyed immediately, so check these values before activating.

Destroy related records also deletes associated records. Journal entries, attachments and audit records are removed automatically in that case, even if you preserve other related records. Use Recalculate Destroy Estimate to see the count, then select Activate archive destroy rule. Destruction happens during the scheduled job, and you can follow it in the archive destroy log.

Choosing what happens to related records

On the Manage related records page, select Add records, choose an action and pick a relationship from the Reference list.

Action Effect on a referencing record
Archive Archived along with the parent
Clear Reference removed, so it no longer appears as related in future archives
Cleanup Deleted

The list includes reference fields on other tables and document ID fields, marked with an asterisk. For document ID relationships, Archive repoints the ID to the archive table, Clear removes it and Cleanup deletes the record. Audit and journal tables cannot be selected.

Cascading is controlled by the Reference table rule field. A related table’s rule runs when you declare it there, and undeclared related records are not cascaded. Since the Washington DC release, this declaration is required even when the related table already has an archive rule.

Activating the rule

The Rule summary page lists the conditions and settings. Choose Activate the rule upon creation if you want it running now. The table’s data management policy must also be active. Matching records are archived in the next archive run.

How archived data behaves afterwards

Archived reference values are fixed. If a user is renamed from John Smith to John A Smith, active incidents show the new name while archived incidents keep the old one. Deleting a user removes that person from active incidents but not from archived ones.

By default, an archive table follows the access rules of its live table. To control access separately, set glide.security.enable_archive_table_acls to true. Then ACLs defined on the archive table govern access, and if none exist the live table’s ACLs apply. If the archive table’s ACLs deny access, there is no fallback. Read is the operation evaluated this way, and other operations are blocked. Upgraded instances do not have the property, so add it manually and set it to true. Enabling it can activate ACLs that were previously ignored, so review them first.

Running, stopping and restoring archived records

Active archive rules run through one system scheduled job that repeats on a 60-minute interval. To change the interval, open the Archive record under Scheduled Jobs and edit the repeat value.

To stop a rule, clear its Active check box. Waiting chunks then change to not-needed. Deleting a rule goes through ServiceNow Customer Service and Support. To cancel a run in progress, call GlideArchiver().cancel() from background scripts. Running chunks become cancelled and no further chunks are processed.

Restoring is done from the Data Management Console. Open the Tables tab, find a table showing Archive in the Status column, select View records, choose the records and then select Restore All Records Matching Conditions or Restore Selected. Confirm the Bulk Restore Request Success dialog. The restored record returns to the primary table and its archive copy is deleted.

You can also restore from the Archive Log. The form offers Restore Record and Restore Record and Related Records. Do not delete archive log entries, because deleting one prevents restoring that record. The restore date appears in the Restored column of the Archive Log.

Tuning how much each run processes

A producer groups records waiting for archiving into chunks. Consumers process those chunks, and each consumer shuts down after a set number of chunks. On the Xanadu release, these defaults can be changed with system properties.

Property Default What it controls
glide.db.archive.chunk_size 1000 Record identifiers per chunk
glide.db.archive.max.rule.records 10000 Maximum records per rule, per consumer
glide.db.archiving.max_consumer_workers 4 Concurrent consumers across the cluster
glide.db.archive.max.batches 10 Chunks a consumer handles before shutting down
glide.db.archive.chunk.max.process.time 600000 Milliseconds before a running chunk is marked as error

A chunk marked as error does not stop the consumer that holds it. These properties have no effect if the chunk table has been deleted.

Querying live and archived data together

Live Archive keeps archived data queryable. In the Brazil release it requires the RaptorDB Professional V2 entitlement, so confirm that with your account representative before installing. An archive table appears after at least one rule has run. Live Archive applies the same access controls to archived records as to live ones, so a user who cannot see a live record cannot see it in the archive.

The formats differ in ways that matter for queries:

Aspect Live table Archive table
Storage Row-oriented Columnar
Reference fields sys_id Display value, or sys_id when Retain References is enabled on the rule
Journal fields Child records Serialized into the row
Changes Editable Restore to the live table to edit

When you combine both in one query, check the reference columns before grouping, because the two sides can hold different values for the same field.

A three-year report of incident volume and mean time to resolve shows the pattern: union incident with ar_incident over a rolling 36-month window, then group by month, priority and DV(assignment_group). Columnar storage suits this because it reads just the columns involved, and Live Archive stores archived data in a compressed format. Full-row retrieval is less efficient, so open single records in the standard record view.

Which storage measures should we check before assuming that an archive will free capacity?

Check four measures before counting freed capacity: table data, attachments, audits and journals for the source table, each recorded before and after a measured archive run. Then confirm the archive mechanism, because archiving that keeps records inside the instance does not, on its own, reduce primary storage usage.

Measure each component of the source table

The Data Management Console reports table data separately from the attachments, audits and journals linked to that table. Read all four before the rule runs. An archive that moves many records can free little if most of the bulk sits in attachments, so a record count on its own says very little about bytes.

Allow a day for usage figures to settle

As of the September 2026 documentation, usage refreshes daily and can take up to 24 hours to reflect changes. Take the after reading at least a full day after the archive job finishes, and compare it with the before reading. A reading taken within hours of a run may reflect the refresh cycle rather than the change in storage.

Separate archiving inside the instance from storage removal

System Archive moves inactive records into archive tables within the same instance and does not reduce primary storage usage. Treat any freed-capacity claim as unproven until the measured before and after readings show it.

Confirm the Live Archive prerequisites

As of November 2026, Live Archive moves records and attachments to object storage only with the required RaptorDB Professional V2 entitlement and configuration in place. Without it, the archive tables stay inside the instance, so no object-storage saving should be counted. Check the agreement for that entitlement before planning around it.

Check the capacity allocation in your agreement

The shared-environment capacity addendum, effective September 9, 2026, lists minimum account-level capacities from 4 TB to 24 TB, depending on contract value, and those totals cover included instances. Check your own allocation and whether production and nonproduction instances draw on the same total before deciding whether freed space matters.

Run a measured check before reporting freed capacity

  1. Record table data, attachments, audits and journals for the source table.
  2. Activate the rule on a nonproduction copy, or on a small named set of records in a test window, and note the time the run completed.
  3. Wait at least 24 hours, then reread all four measures for the same table.
  4. If a destroy step is set, note its duration and confirm in the archive destroy log that the scheduled run has deleted records.
  5. Compare the measured change with the archive estimate and report the difference, not the estimate.

What to compare in the results

  • Primary table data before and after, which is the figure that matters for instance capacity.
  • Attachment bytes for the archived records, since attachments can dominate a record’s raw payload.
  • Journal and audit volume, which a destroy run clears when related records are included.
  • The gap between the archive estimate and the measured change.

Frequently asked questions

Which tables can use archive rules?

Core tables such as Task and custom tables can. Configuration item records use the CMDB Data Manager, and email uses the Email retention plugin.

Are related records archived automatically?

No. Add them on the Manage related records page and declare their rule in the Reference table rule field. Undeclared related records are not cascaded.

Can an archived record be edited?

To change an archived record, restore it to the live table, edit it there, and let the rule archive it again when it matches.

What happens if an archive log entry is deleted?

The log holds the sys_id and reference display values needed to restore the record, so deleting the entry prevents restoring it.