The tos vacuum Command

Overview

The tos vacuum command identifies and removes unnecessary items from databases, such as files that should have already been deleted from TOS databases. This command frees disk space and helps the SecureTrack, SecureChange, and Remote Cluster (RC) databases, run more efficiently.

Running tos vacuum after tos archive

Run tos vacuum after running tos archive commands. tos archive commands save revision data to an archive file, which you can load back into the database when needed.

Running tos vacuum on databases
  • You can run tos vacuum on one or more of the TOS databases: SecureTrack, SecureChange, and Remote Cluster (RC).

  • In High Availability (HA) environments, run tos vacuum only on the primary node.

See TOS vacuum.

How does it work?

tos vacuum stops the TOS core services; TOS is unavailable while this command runs. It uses a temporary file in /opt as a workspace and when it completes, it writes data from this temporary space back to the database. After completion, it runs the analyze flag, and then restarts the core services and TOS. This command times out automatically after six hours.

Prerequisites

  • Minimum free space in /opt equal to the total size of /opt/tufin/data/volumes/postgres/stolon/.

  • Before running this command, Tufin recommends that you take a backup of your database and wait for the backup to complete. tos vacuum fails while a backup (either started manually or scheduled) is in progress.

TOS vacuum

Description

Runs a full vacuum operation on the local postgres database, which could be SecureTrack or SecureChange. In the case of the RC database, the postgres database name (and the tos vacuum command) is the same as SecureTrack.

Running tos vacuum from the:

  • SecureTrack server, runs it on SecureTrack's postgres database.

  • From the RC server, runs it on the RC's postgres database.

Syntax

[<ADMIN> ~]# tos vacuum [--modules <MODULE>] [--debug] [--help] 
tos vacuum

Parameters

Parameter

Description

Mandatory/Optional

Possible Values

<MODULE>

Specify one or more modules to vacuum.

If not specified, the default is ST (SecureTrack).

Optional

ST

=SC

=ST,SC

--st-tables

Vacuum one or more SecureTrack tables only.

Limits the operation to the specified tables instead of the entire SecureTrackdatabase.

Optional

<table1><table2>...: names of the tables being vacuumed.

The table name cannot include a prefix.

--sc-tables

Vacuum one or more SecureChange tables only.

Limits the operation to the specified tables instead of the entire SecureChange database.

Optional

<table1><table2>...: names of the tables being vacuumed.

The table name cannot include a prefix.

Example

[<ADMIN> ~]# tos vacuum --modules=ST,SC
[<ADMIN> ~]# tos vacuum --st-tables=last_processed_device_statuses