> Source: [sk170059](https://support.checkpoint.com/results/sk/sk170059)

# sk170059 - Automatic Revisions Purge: overview and how-to

| Property | Value |
|----------|-------|
| Solution ID | sk170059 |
| Date Created | 2020-10-19 |
| Last Modified | 2025-07-09 |
| Technical Level | General |
| Products | Security Management Server, Multi-Domain Security Management Server |
| Versions | R81.20, R81.10 (EOS), R81 (EOS), R81 (EOS), R81.10 (EOS), R81.20 |

## Solution

**What is a revision?**   

A revision is a copy of a database at a given time.   

The usage of revisions is necessary for safe recovery from crises and for the function of the Management High-Availability architecture, among others.

**Why should we get rid of unused revisions?**   

In order for Postgres to complete certain operations, it will require the checking of all existing revisions stored on the server.   

The fewer revisions there are to check, the faster Postgres will be able to complete certain tasks.

The collecting of unused revisions likewise leads to the ballooning of your database in size, which leads to other performance issues.  

**How can revisions be purged automatically?**   

Automatic revision purging is an important maintenance operation that can be used to clear unused data and thus reduce disk space usage and improve the performance.  

Automatic revision purging gives the user the ability to execute the purge operation as a scheduled task and according to parameters of the user's choosing.  

**Best Practice** - We recommend to configure automatic revisions purge to run one time during a month and configure it to purge all revisions that are older than ten days.  

Using the [Management API](https://sc1.checkpoint.com/documents/latest/APIs/index.html#cli/set-automatic-purge~v1.7%20) guide, you can configure the state of the automatic revision purging (on/off) and configure it according to a number of parameters, including the number of overall sessions and/or a set age.  

The configuration is done on the active Management Server.  

This feature is implemented in:  

* [Check Point R81](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk166715) (and higher)
* [Jumbo Hotfix Accumulator for R80.40](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk165456) - starting from Take 78
* [Jumbo Hotfix Accumulator for R80.30](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk153152) - starting from Take 217
* [Jumbo Hotfix Accumulator for R80.20](https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&solutionid=sk137592) - starting from Take 183

**A note for MDS environments:** You must add the *--d/--domain \<domain\>* flag for each Domain, on which you wish to configure automatic purging.  
Starting from R81.10 and above, automatic purge cannot be configured at the System domain (MDS level). However, it is now possible to configure automatic purge in the Global domain. Currently, this feature is only available in the Global domain for R82 and above. It will be made available for older versions in the future.  

Usage Explanation: With the updated feature, only revisions that do not impact any local domains will be deleted, while the system attempts to remove as many revisions as the user has specified. Additionally, the most recent backed-up revision for each domain will be kept unless the user specifies otherwise.  

How to Use the Updated Feature: The syntax for this feature follows the standard automatic-purge API command, with an added -d Global flag for specifying the Global domain. There is also an optional ignore-domain-backup true flag, which allows users to ignore backed-up revisions if they choose not to retain them  

**To run the purge from the MGMT API using the Expert mode** , the steps would be as follows:  

Change MDS context to MDS level: (For SMS, skip this step)  

# mdsenv  

Purge MDS Level Revisions (System Data):  

`# mgmt_cli -r true purge-published-sessions number-of-sessions-to-preserve <int/number_of_rev_to_preserve> -d "System Data"`  

For example:  

`# mgmt_cli -r true purge-published-sessions number-of-sessions-to-preserve 1 -d "System Data"`  

Purge Global Domain Revisions:  

` # mgmt_cli -r true purge-published-sessions number-of-sessions-to-preserve <int/number_of_rev_to_preserve> -d "Global"`  

For example:  

`# mgmt_cli -r true purge-published-sessions number-of-sessions-to-preserve 1 -d "Global"`  

**Additional Note:** It is possible to enable both: "keep sessions by count" \& "keep sessions by time", what will happen is the following:  
In case both are enabled then both will be checked on how many revisions will be deleted and then the lesser one will be chosen to avoid any conflict of deleting revisions that the customer doesn't wish to delete.

---

# Agent Instructions

This content is from the Check Point Support Center (https://support.checkpoint.com), the official knowledge base for Check Point cybersecurity products.

## Navigating This Knowledge Base

- **Complete index**: [llms.txt](https://support.checkpoint.com/llms.txt)
- **All SK articles**: [SecureKnowledge Sitemap](https://support.checkpoint.com/sitemaps/secureknowledge-sitemap-index.xml)
- **SK article URL pattern**: `https://support.checkpoint.com/results/sk/{skId}`
- **Markdown responses**: AI bot User-Agents automatically receive `text/markdown` content
