WAS v8.5 > Reference > Commands (wsadmin scripting)

RepositoryCheckpointCommands command group for the AdminTask object using wsadmin.sh

We can use the Jython or Jacl scripting language to create, restore, delete, and administer checkpoints with wsadmin. Repository checkpoints represent saved images of the repository before configuration changes are made. The commands in the RepositoryCheckpointCommands group support the repository checkpoint functions in wsadmin local and connected modes.

We can configure a checkpoint to back up copies of files from the master configuration repository. A full checkpoint is a complete copy of the entire configuration repository. A delta checkpoint is a subset snapshot of the configuration repository that is made when we change a product configuration. Use a checkpoint to restore the configuration repository back to a prior state.

The following commands are available for the RepositoryCheckpointCommands group of AdminTask:

To enable automatic checkpoints, use the setAutoCheckpointEnabled command and set -autoCheckpointEnabled to true. WAS v8.5 creates a delta checkpoint whenever a change is made to the configuration repository. We do not need to restart the server after running the command. After the automatic checkpoint function is enabled, the product creates a delta checkpoint automatically in the profile_root/checkpoints directory when any configuration change is made and saved to the configuration repository. WAS v8.5 stores the configuration repository in the profile_root/config directory. Actions such as creating an application server and saving the configuration change results in creation of a delta checkpoint. The checkpoint preserves an image of the repository before the configuration change is made.

After running commands that change the configuration repository, the product automatically saves the configuration changes. We do not need to run AdminConfig.save() after running commands such as createFullCheckpoint, deleteCheckpoint, restoreCheckpoint, setAutoCheckpointDepth, setAutoCheckpointEnabled, or setCheckpointLocation.


createFullCheckpoint

Use the createFullCheckpoint command to create a full checkpoint. Provide a -checkpointName value to name the full checkpoint.

Target object

None

Required parameters

-checkpointName

Name of the full checkpoint. (String, required)

After the command runs successfully, the product returns the -checkpointName value.

Optional parameters

-checkpointDesc

Description of the full checkpoint. (String, optional)

Batch mode example usage

Interactive mode example usage


deleteCheckpoint

Use the deleteCheckpoint command to delete the checkpoint specified by the -checkpointName value. We can delete any full checkpoint. As to delta checkpoints, we can only delete the oldest delta checkpoint.

Target object

None

Required parameters

-checkpointName

Name of the checkpoint to delete. We can specify the name of any full checkpoint to delete. (String, required)

For transitioning users: To delete a delta checkpoint, specify the name of the oldest delta checkpoint.trns

Optional parameters

None

Interactive mode example usage


extractRepositoryCheckpoint

Use the extractRepositoryCheckpoint command to extract a delta repository checkpoint. Provide a -checkpointName value to identify the repository to extract and an -extractToFile value to specify the full path name of the compressed file to hold the extracted checkpoint files.

Target object

None

Required parameters

-checkpointName

Name of the repository checkpoint to extract. We can extract only a delta repository checkpoint. (String, required)

-extractToFile

Name and target location of the compressed file to which the product extracts the repository checkpoint. The name of the compressed file can have .zip or .jar for the extension, or the file name can have no extension. (String, required)

Optional parameters

None

Batch mode example usage

Interactive mode example usage


getAutoCheckpointDepth

Use the getAutoCheckpointDepth command to get the number of automatic delta checkpoints the product keeps. After the number of delta checkpoints is reached, the product deletes the oldest delta checkpoint each time a new delta checkpoint is made. The command returns the number of automatic delta checkpoints to keep.

Target object

None

Required parameters

None

Optional parameters

None

Example usage


getAutoCheckpointEnabled

Use the getAutoCheckpointEnabled command to find out whether automatic creation of delta checkpoints is enabled. The command returns true if automatic checkpoints are enabled and false if automatic checkpoints are disabled.

Target object

None

Required parameters

None

Optional parameters

None

Example usage


getCheckpointLocation

Use the getCheckpointLocation command to get the directory path where checkpoints are stored. The command returns the directory path. WAS v8.5 stores checkpoints in the profile_root/checkpoints directory.

Target object

None

Required parameters

None

Optional parameters

None

Example usage


getConfigRepositoryLocation

Use the getConfigRepositoryLocation command to get the directory path where the configuration repository is stored. The command returns the directory path. WAS v8.5 stores the configuration repository in the profile_root/config directory.

Target object

None

Required parameters

None

Optional parameters

None

Example usage


listCheckpoints

Use the listCheckpoints command to get a list of existing checkpoints.

Target object

None

Required parameters

None

Optional parameters

None

Example usage

Example output

full1(cells/MyCell/repository/checkpoints/full1|checkpoint.xml)
Delta-1323948371187(cells/MyCell/repository/checkpoints/Delta-1323948371187|checkpoint.xml)
Delta-1323904606781(cells/MyCell/repository/checkpoints/Delta-1323904606781|checkpoint.xml)
Delta-1323904256625(cells/MyCell/repository/checkpoints/Delta-1323904256625|checkpoint.xml)


listCheckpointDocuments

Use the listCheckpointDocuments command to get a list of documents in a checkpoint repository. Provide a -checkpointName value to identify the checkpoint from which to get the list of documents.

Target object

None

Required parameters

-checkpointName

Name of the checkpoint to search for a list of documents. (String, required)

Optional parameters

None

Interactive mode example usage

Example output

authorizationgroup.xml(cells/MyCell/repository/checkpoints/Delta-132|checkpoint.xml#CheckpointDocument_1325)
audit-authz.xml(cells/MyCell/repository/checkpoints/Delta-132|checkpoint.xml#CheckpointDocument_1326)
admin-authz.xml(cells/MyCell/repository/checkpoints/Delta-132|checkpoint.xml#CheckpointDocument_1327)


restoreCheckpoint

Use the restoreCheckpoint command to restore the configuration repository back to the state it was in at the time a checkpoint was made. Provide a -checkpointName value to identify the full or delta checkpoint to restore.

Use a full checkpoint to restore the entire configuration repository back to the state it was in at the time the full checkpoint was made.

Use delta checkpoints to undo recent changes. Restore delta checkpoints only in the reverse order in which they were created. Each delta checkpoint has a sequence number. The highest sequence number represents the most recent delta checkpoint. Thus, restore delta checkpoints in descending sequence number only.

For transitioning users: After the configuration repository is restored from a delta checkpoint, the product creates a checkpoint containing the configuration before restoration.trns

If the delta checkpoint to restore is the oldest saved checkpoint, we might need to increase the number of delta checkpoints. Run the getAutoCheckpointDepth command to find out how many delta checkpoints the product keeps. After the number of delta checkpoints is reached, the product deletes the oldest delta checkpoint each time a new delta checkpoint is made. To increase the number of saved delta checkpoints, use the setAutoCheckpointDepth command.

When you restore a checkpoint, save conflicts occur if we have uncommitted changes in your workspace. The checkpoint gets restored, but the uncommitted changes are flagged as a save conflict when we attempt to save them. Also, if more than one user is working on configuration changes to the repository, then other users with uncommitted changes get save conflicts as well if one user performs a checkpoint restoration.

Target object

None

Required parameters

-checkpointName

Name of the checkpoint to restore. (String, required)

Optional parameters

None

Interactive mode example usage


setAutoCheckpointDepth

Use the setAutoCheckpointDepth command to specify the number of delta checkpoints to keep. If the number of saved delta checkpoints exceeds the specified checkpoint depth, the product deletes the oldest delta checkpoints, keeping no more than the specified checkpoint depth.

Target object

None

Required parameters

-autoCheckpointDepth

Number of automatic delta checkpoints to keep. (Integer, required)

Optional parameters

None

Interactive mode example usage


setAutoCheckpointEnabled

Use the setAutoCheckpointEnabled command to enable or disable automatic delta checkpoints. If automatic repository checkpoints are enabled, the product creates a delta checkpoint whenever a change is made to the configuration repository. A delta checkpoint compressed file contains the before and after versions of configuration files that have changed. We can extract the contents of the compressed file and then examine the extracted files to determine what has changed in the configuration.

After running setAutoCheckpointEnabled, we do not need to restart the server for the setting change to take effect.

Target object

None

Required parameters

-autoCheckpointEnabled

Whether to save the product configuration before a configuration change automatically to a repository checkpoint. A true value enables automatic checkpoints. A false value, the default, disables automatic checkpoints. (Boolean, required)

Optional parameters

None

Interactive mode example usage


setCheckpointLocation

Use the setCheckpointLocation command to set the directory path where checkpoints are stored. By default, the product stores checkpoints in the profile_root/checkpoints directory.

Target object

None

Required parameters

-checkpointLocation

Directory path where checkpoints are stored. (String, required)

Optional parameters

None

Interactive mode example usage


Related


Configure checkpoints
Restoring checkpoints


+

Search Tips   |   Advanced Search