You can use the Jython or Jacl scripting language to create, restore, delete, and administer checkpoints with the wsadmin tool. 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.
You 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 you change a product configuration. Use a checkpoint to restore the configuration repository back to a prior state.
To enable automatic checkpoints, use the setAutoCheckpointEnabled command and set -autoCheckpointEnabled to true. The product creates a delta checkpoint whenever a change is made to the configuration repository. You 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. The product 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. You do not need to run AdminConfig.save() after running commands such as createFullCheckpoint, deleteCheckpoint, restoreCheckpoint, setAutoCheckpointDepth, setAutoCheckpointEnabled, or setCheckpointLocation.
Use the createFullCheckpoint command to create a full checkpoint. Provide a -checkpointName value to name the full checkpoint.
Target object
None
Required parameters
After the command runs successfully, the product returns the -checkpointName value.
Optional parameters
Batch mode example usage
AdminTask.createFullCheckpoint('[-checkpointName full2 -checkpointDesc "a test"]')
AdminTask.createFullCheckpoint(['-checkpointName', 'full2'])
Interactive mode example usage
AdminTask.createFullCheckpoint('[-interactive]')
Use the deleteCheckpoint command to delete the checkpoint that is specified by the -checkpointName value. You can delete any full checkpoint. As to delta checkpoints, you can only delete the oldest delta checkpoint.
Target object
None
Required parameters
Optional parameters
None
Batch mode example usage
AdminTask.deleteCheckpoint('[-checkpointName full2]')
AdminTask.deleteCheckpoint(['-checkpointName', 'full2'])
Interactive mode example usage
AdminTask.deleteCheckpoint('[-interactive]')
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
Optional parameters
None
Batch mode example usage
Interactive mode example usage
AdminTask.extractRepositoryCheckpoint('[-interactive]')
Use the getAutoCheckpointDepth command to get the number of automatic delta checkpoints that 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
print AdminTask.getAutoCheckpointDepth()
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
print AdminTask.getAutoCheckpointEnabled()
Use the getCheckpointLocation command to get the directory path where checkpoints are stored. The command returns the directory path. The product stores checkpoints in the profile_root/checkpoints directory.
Target object
None
Required parameters
None
Optional parameters
None
Example usage
print AdminTask.getCheckpointLocation()
Use the getConfigRepositoryLocation command to get the directory path where the configuration repository is stored. The command returns the directory path. The product stores the configuration repository in the profile_root/config directory.
Target object
None
Required parameters
None
Optional parameters
None
Example usage
print AdminTask.getConfigRepositoryLocation()
Use the listCheckpoints command to get a list of existing checkpoints.
Target object
None
Required parameters
None
Optional parameters
None
Example usage
print AdminTask.listCheckpoints()
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)
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
Optional parameters
None
Batch mode example usage
AdminTask.listCheckpointDocuments('[-checkpointName Delta-132]')
AdminTask.listCheckpointDocuments(['-checkpointName', 'Delta-132'])
Interactive mode example usage
AdminTask.listCheckpointDocuments('[-interactive]')
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)
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.
When you restore a checkpoint, save conflicts occur if you have uncommitted changes in your workspace. The checkpoint gets restored, but the uncommitted changes are flagged as a save conflict when you 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
Optional parameters
None
Batch mode example usage
AdminTask.restoreCheckpoint('[-checkpointName Delta-132]')
AdminTask.restoreCheckpoint(['-checkpointName', 'Delta-132'])
Interactive mode example usage
AdminTask.restoreCheckpoint('[-interactive]')
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
Optional parameters
None
Batch mode example usage
AdminTask.setAutoCheckpointDepth('[-autoCheckpointDepth 5]')
AdminTask.setAutoCheckpointDepth(['-autoCheckpointDepth', '5'])
Interactive mode example usage
AdminTask.setAutoCheckpointDepth('[-interactive]')
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. You 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, you do not need to restart the server for the setting change to take effect.
Target object
None
Required parameters
Optional parameters
None
Batch mode example usage
AdminTask.setAutoCheckpointEnabled('[-autoCheckpointEnabled true]')
AdminTask.setAutoCheckpointEnabled(['-autoCheckpointEnabled', 'true'])
Interactive mode example usage
AdminTask.setAutoCheckpointEnabled('[-interactive]')
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
Optional parameters
None
Batch mode example usage
AdminTask.setCheckpointLocation('[-checkpointLocation ${USER_INSTALL_ROOT}/checkpoints/temp]')
AdminTask.setCheckpointLocation(['-checkpointLocation', '${USER_INSTALL_ROOT}/checkpoints/temp'])
Interactive mode example usage
AdminTask.setCheckpointLocation('[-interactive]')