You can use the SIDB2 tool to compact data files in the Deduplication Database (DDB) to prevent disk space exhaustion. If your DDB is partitioned, run the compaction on each partition either sequentially or in parallel.
Note
Periodic manual compaction is not required. The system reclaims space automatically during data aging. Only run manual compaction if instructed by the support team.
Supported Configurations
-
v10 DDBs on v11 MediaAgent
-
v11 DDBs on v11 MediaAgent
Compaction Types
Primary and Core File Compaction
This operation compresses and rebuilds indexes for the following DDB files:
-
properties.dat
-
primary.dat
-
zeroref.dat
-
archive.dat
You can compact all files or specify an individual file using the -compactfile
option.
Important
Ensure available free disk space is at least twice the size of the largest data file. Insufficient space may result in compaction failure and database corruption.
Secondary File Compaction
This process is required to convert legacy DDBs (pre-SP14) for Garbage Collection support. DDBs created post-SP14 are automatically compatible.
Use the -compactfile secondary
option to reclaim space related to aged backup jobs by consolidating secondary index files.
Note
Ensure free disk space is equal to the size of the largest secondary file.
Before You Begin
Caution
During compaction, the DDB becomes unavailable. Jobs depending on it will enter a pending state.
-
Ensure the following jobs are not running:
-
Backup jobs
-
DDB backup jobs
-
DDB move/reconstruction
-
Auxiliary copy jobs
-
-
In environments with multiple MediaAgents, ensure that no jobs are running on the DDB before starting the compaction process. This prevents potential conflicts, even if other MediaAgents remain operational.
-
Disable QuickEdit Mode in Windows Command Prompt properties.
-
Enable Maintenance Mode on the MediaAgent before performing DDB compaction to avoid conflicts with active jobs. For instructions, see Setting a MediaAgent Offline for Maintenance.
-
Verify that no SIDB2 process is currently running:
-
Windows: Check via Task Manager > Processes.
-
Linux: Run commvault list.
Do not terminate an active SIDB2 process manually. Wait for it to stop before you proceed with compaction.
-
Command Usage
Navigate to the installation directory: <software_installation_directory>/Base
Syntax
Windows
Full compaction
sidb2 -compact -in instance_number -cn client_name -i DDB_ID -split split_number
Specific file compaction
sidb2 -compactfile Primary|Zeroref|Property|Archive -in instance_number -cn client_name -i $DDB_ID -split split_number
Secondary file compaction
sidb2 -compactfile secondary -i DDB_ID -split split_number
Linux
Full compaction
./sidb2 -compact -in instance_number -cn client_name -i DDB_ID -split split_number
Specific file compaction
./sidb2 -compactfile Primary|Zeroref|Property|Archive -in instance_number -cn client_name -i DDB_ID -split split_number
Secondary file compaction
./sidb2 -compactfile secondary -i DDB_ID -split split_number
Parameter Descriptions
Option | Description |
---|---|
-compact | Compacts all core files in the DDB. |
-compactfile | Compacts a specific data file (e.g., property, primary, and so on). |
- compactfile secondary | Compacts all secondary files into single archives. |
-in | Specifies the instance of the software. |
-cn | Client name of the MediaAgent hosting the DDB. |
-i | DDB ID (available from Deduplication Engines in the CommCell Browser). |
-split | DDB partition number (e.g., Split 01 in path E:\<DDB Folder>...). |
Examples
Full Compaction
sidb2 -compact -in Instance001 -cn DDBMediaAgent01 -i 86 -split 01
Compact the Primary File
sidb2 -compactfile primary -i 1288 -split 00
Compact Secondary Files
sidb2 -compactfile secondary -i 2370 -split 00
Post-Compaction Recommendations
-
Run a new DDB backup after compaction. Previous DDB backups are invalidated.
-
If firewalls or network restrictions are configured, manually start the Network Daemon service before running compaction.
Note
Compacting a 500 GB DDB may take approximately 4 hours.
Sample Output
-compact
Output
sidb2 -compact -in Instance001 -cn DDBMediaAgent01 -i 86 -split 01
Getting information for engine [86]...
Compacting property file. Recs [91]
Compressing data file... 98%
Rebuilding index... 98%
Compacting primary file. Recs [2854865]
Compressing data file... 100%
Rebuilding index... 100%
Compacting zeroref file. Recs [45534]
Compressing data file... 99%
Compacting archive file. Recs [89]
Compressing data file... 95%
Compacting completed successfully.
-compactfile
Output
sidb2 -compactfile primary -i 1288 -split 00
Getting information for engine [1288]...
Compacting primary file. Recs [1240]
Compressing data file... 100%
Compacting completed successfully.
-compactfile secondary Output
sidb2 -compactfile secondary -i 2370
Getting information for engine [2370]...
Compacting secondary [Secondary_30440.idx]
...
Compacting secondary [Secondary_30452.idx]
Compacting completed successfully.