Compact options

This topic describes options you can use with the Compact server task.

In each table, the first column lists the options as they appear when you run Compact using the Task > Start tool or the Files tab in the Domino® Administrator. The second column lists the equivalent command-line options that you use when you run Compact using a console command or using a Program document.

Compact - Basics

Table 1. Basics
Option Command-line equivalent Description

Compact only this database or folder

(To specify databases to compact using the Files tab, select the databases in the files pane.)

 database path 

Specify any additional options after the database path.

To compact a database in the Domino® data folder, enter the file name, for example SALES.NSF. To compact databases in a folder within the data folder, specify the database path relative to the data folder. For example, to compact all databases in the folder DATA\SALES, specify SALES.

If you select Compact all databases (or do not specify a database path at the command line), Compact compacts all databases in the data folder and in folders within the data folder.

Compact - Options

Table 2. Options
Option Command-line equivalent Description

Compact database only if unused space is greater than x percent

-S percent 

Compacts all databases with a specified percent of unused space. For example, if you specify 10, databases with 10% or more recorded unused space are compacted. Note that the unused space calculation is not always a reliable measure of unused space.

Discard any built view indexes

-D

Discards built view indexes. Use this option to compact databases that are not in active use, for example, just before you store databases on tape. Additional system time and resources should be planned to rebuild indexes after restore of the databases. This option uses copy-style compacting.

Revert database one level back based on current release of server

-r

Compacts databases and reverts them to one release earlier than the current release file format of the server that stores the databases. For example, on Domino® 8.5.3 and more recent servers, this option compacts Domino® 8 databases and converts them to the Domino® 7 file format. This option uses copy-style compacting.

Revert database one level back based on current release of specified database

-R

Compacts databases and reverts them to one release earlier than the current file format of the databases themselves. For example, on Domino® 8.5.3 and more recent servers, this option compacts Domino® 8 databases and converts them to the Domino® 7 file format, converts Domino® 7 databases to Domino® 6 databases, and so on. This option uses copy-style compacting.

Compact - Style

Table 3. Style
Option Command-line equivalent Description

In-place (recommended)

-b

Uses in-place compacting and recovers unused space without reducing the file size, unless there's a pending structural change to a database, in which case copy-style compacting occurs. This is the recommended method of compacting.

In-place with file size reduction

-B

Uses in-place compacting, recovers unused space and reduces file size, unless there's a pending structural change in which case copy-style compacting occurs. If you use transaction logging, do full database backups after compacting completes.

Copy-style

-c

Uses copy-style compacting. Use this option, for example, to solve database corruption problems, or in combination with compression options to act upon existing documents as well as documents yet to be created.

Copy-style: Allow access while compacting

-L

Enables users to continue to access databases during compacting. If a user edits a database during compacting, compacting is canceled. This is useful only when copy-style compacting is done.

Copy-style: Ignore errors and proceed

-i

Enables compacting to continue even if it encounters errors such as document corruption. Only used for copy-style compacting.

Replication-style

-REPLICA

Creates a new replica in the background while compacting. The new replica is automatically renamed, and the source application remains accessible except during actual renaming. Also applies any of the three optional parameters specified in this table.

Replication-style: Specify limit on IDs

-IDS_FULL

Creates a new replica while compacting, but only after a specified nn percentage of IDs in application has been reached.

Example: -IDS_FULL 80 creates replica only after 80% of space for IDs in original application is full.

Replication-style: Specify wait for renaming replica

-REN_WAIT

Creates a new replica while compacting. Waits nn minutes before renaming replica.

Example: -REN_WAIT 10 allows 10 minutes for compact process to complete replication and synchronization to attempt renaming.

Replication-style: Restart server on renaming failure

-RESTART

Creates a new replica while compacting. If automatic renaming of replica does not succeed, restarts the server and completes the renaming of the replica after server startup.

Compact - Advanced

The advanced compact options are not available through the Compact tool in the Files tab of the Domino® Administrator.

Note: Select Set advanced properties before you enable or disable any of these properties.
Table 4. Advanced
Option Command-line equivalent Description

Document table bitmap optimization: Off

-f

Disables Document table bitmap optimization database property. Does copy-style compacting.

Document table bitmap optimization: On

-F

Enables Document table bitmap optimization database property. Does copy-style compacting.

Don't support specialized response hierarchy: Off

-h

Disables Don't support specialized response hierarchy database property; in other words, support specialized response hierarchy. Does copy-style compacting.

Don't support specialized response hierarchy: On

-H

Enables Don't support specialized response hierarchy database property; in other words, do not support specialized response hierarchy. Does copy-style compacting.

Enable transaction logging: Off

-t

Disables transaction logging.

Enable transaction logging: On

-T

Enables transaction logging. Use Compact - T when a database is open or closed. If you use Compact - T on a database that is closed, logging is enabled but the Compact is not logged until the database is opened; therefore, logging is not available until you reopen the database.

Don't maintain unread marks: Off

-u

Disables Don't maintain unread marks database property; in other words, maintain unread marks.

Don't maintain unread marks: On

-U

Enables Don't maintain unread marks database property; in other words, do not maintain unread marks.

Database design compression: On

-n

Enables Compress database design database property, setting all new design elements to be compressed.

Database design compression: Off

-N

Disables Compress database design database property, preventing new design elements from being compressed.

Document data compression: On

-v

Enables Compress document data database property, setting all non-summary data in new documents to be compressed.

Document data compression: Off

-V

Disables Compress document data database property, preventing compression of document non-summary data in new documents.

LZ1 attachment compression On

-ZU

Upgrades attachments to LZ1 compression from Huffman compression.

Note: To compress or decompress existing design elements or non-summary document data, combine either the -n, -N, -v, or -V switch with the copy-style switch (-c). For example, to compress existing non-summary data in a database at the same time as enabling the property to compress new document data, use this combination:
-v -c

Compact - Archive

When you use the document archiving tool to archive and delete documents in a database, you can use the listed Compact options to archive documents if the database is located on a server and you've chosen the basic archiving option Domino server based.

For more information on the server archiving option, see the topic Specifying the computers where archiving runs and where the archive is stored in IBM® Notes® 9.0.1 Social Edition Help.

Note: The Compact tool in the Files tab of the Domino® Administrator provides only the option Archive database; this option archives and then compacts.
Tip: See the Compact - DAOS table for another combination of archiving, compaction, and attachment consolidation.
Table 5. Archive
Option* Command-line equivalent Description

Archive only

-A

Archives and deletes documents from a database without compacting the database.

Archive and then compact

-a

Archives and deletes documents from a database and then compacts the database.

Delete and then archive

-j

Deletes documents from a database and then compacts the database.

Compact - DAOS

In addition to enabling the Domino® Attachment and Object Service (DAOS) property to consolidate new attachments in a database, you can use the listed Compact options to move attachments in existing documents into the DAOS repository while performing a copy-style compact of either a normal or archive database. This option is not available for in-place compaction.

Note: This combination of compact options works only on newly created, not existing, archive databases.
Table 6. DAOS
Option Command-line equivalent Description

Use Domino® Attachment and Object Service

-c -daos on|off

When set as on, moves attachments from existing documents to the DAOS repository and then compacts the database. When set as off, moves attachments back into the database NSF file.

Use Domino® Attachment and Object Service in a newly created archive database

-c -a -daos on

When set as on, moves attachments from existing documents to the DAOS repository and then compacts the newly created archive database.

Compact - Move views out of database

You can use the listed Compact option to store view indexes separately if the NIFNSFEnable=1 property is set in the NOTES.INI file on the server. This option is not available for in-place compaction. For more information, see Moving views out of databases

Note: This compact option works only on databases that have an on-disk structure (ODS) of 51 or later.
Table 7. Move views out of database
Option Command-line equivalent Description

Not available

-c -nifnsf on|off

When set as on, stores view indexes separately from the NSF file to improve database performance. View indexes are moved to the location defined by the NIFBasePath setting in the NOTES.INI file. When set as off, moves views back into the database NSF file.

Compact - Replication

Table 8. Replication
Option Command-line equivalent Description

Replication-style

-REPLICA

Creates a new replica in the background while compacting. The new replica is automatically renamed, and the source application remains accessible except during actual renaming and a final resync. Also applies any of the three optional parameters specified in this table. If the database is open or in use by local accessors at the time of the rename/resync, the rename/resync is deferred until the next time the database is opened.

Replication-style: Specify limit on IDs

-IDS_FULL

Perform replication-style compaction only if a specified nn percentage of IDs in application has been reached.

Example: -IDS_FULL 80 creates replica only after 80% of space for IDs in original application is full.

Replication-style: Specify wait for renaming replica

-REN_WAIT

When performing replication-style compaction, attempts for nn minutes to rename the replica before the compact operation defers the rename until a restart or reopen of the database.

Example: -REN_WAIT 10 allows 10 minutes for compact process to complete replication and synchronization to attempt renaming.

Replication-style: Restart server on renaming failure

-RESTART

When performing replication-style compaction, if automatic renaming of replica does not succeed due to other accessors to the database, restarts the server and completes the renaming of the replica after server startup.