Purge Vaults Actions

Purge Vaults actions remove revision data from the specified Vaults, retaining the most recent N months of revision data. The Vaults to be purged and the number of months of revision data to retain for each Vault are specified in the action’s Source table.

Note: Revision data that has been purged from a Vault cannot be recovered.

Action Property Description
Result A Table dataset that stores the results of the purge operation.
Source A Table parameter or dataset with NAME and MONTHS columns, specifying the Vaults to be purged and the number of months of revision data to retain for each Vault.

In the Source table, the NAME column stores the name of each Vault from which data is to be purged. The Vault’s name should be specified only, and not its folder path in the LiveCompare hierarchy. The wildcard symbol * may be used to specify that revision data will be purged from all Vaults. In this case, all other entries in the Source table are ignored. Vault names are case-sensitive, so be sure to uncheck the Table Editor’s ‘Force Upper Case’ check box before completing the NAME column.

The MONTHS column stores the number of months of revision data (N) to retain for each Vault. The most recent N months of revision data will be retained in the Vault. If the wildcard symbol * is specified in the NAME column, the most recent N months of revision data will be retained in each Vault.

If a Vault contains less than N months of revision data, it will not be affected by the purge operation.

The Result dataset has the following columns:

Column Description
VAULT The name of a Vault specified in the Source table.
STATUS The result of the purge operation.
REV The earliest revision number retained for the Vault. This column is blank if no revision data was purged from the Vault.
SIZE_BEFORE(Kb) The size of the Vault before the purge operation (in KB).
SIZE_AFTER(Kb) The size of the Vault after the purge operation (in KB).

The STATUS column may contain the following values:

Value Description
OK The purge was successful.
VaultNotFound The Vault files were not found. They may have been manually deleted.
VaultNeedsUpgrade The Vault is from an earlier release of LiveCompare and needs to be upgraded.

Example:

Purge Vaults action example.

MONTHS Value

The MONTHS value in the Purge Vault action’s Source table is used to determine the earliest Vault revision to be kept. The calculation is as follows:

  1. Take today's date and subtract the specified number of months from it.
  2. Change the resulting date to the first date of the month.
  3. Find the first revision older than the given date.

In addition, an earlier Full revision is kept if the earliest revision to be kept is a Delta revision. See the ‘Full and Delta Snaps’ section below.

Full and Delta Snaps

Snaps store table data at a particular point in time. Each Vault revision is stored as one of two types of snap:

  • Full snaps contain all the records in the table to be stored. Each Vault contains at least one full snap.
  • Delta snaps contain the differences between the last Full snap and the current state of the table.

The following diagram illustrates revision data stored in a Vault, showing a number of Full and Delta snaps.

 

Full and Delta snaps example.

This approach has several advantages:

  • It minimizes disk load. Delta snaps are smaller than Full snaps.
  • It allows fast construction of a table at any particular revision. In the worst case, a revision maps to a Full and Delta snap.

LiveCompare creates new Full snaps when either:

  • Table columns or keys have changed, or
  • More than a certain percentage of table rows have changed.

Purging Vault Data

We can expand the above diagram to include the months in which the snaps were taken:

Full and Delta snaps example with months.

Suppose it is the 30th June, and we purge the result to retain only one month of data. The result looks like this (snaps that have been purged are shown in gray).

Full and Delta Snaps example after purge.

LiveCompare takes the retention period specified in the Purge Vaults action, finds the snaps at that point in time and walks backwards to find the next Full snap. Everything before that point is purged. No matter what the retention period, LiveCompare will keep at least one Full snap in the Vault.

To examine the details for a Purge Vaults action, double-click the action node, or select ‘View Details’ from the node’s context menu. The Details screen displays the total number of Vaults processed, and the time taken for the action to complete.


Was this information helpful?

Tricentis LiveCompare Manual 4.1 © Tricentis US Corp.