RepositoryCheckpointCommands command group for the AdminTask object using wsadmin scripting
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.
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
- Specifies the name of the full checkpoint. (String, required)
After the command runs successfully, the product returns the -checkpointName value.
Optional parameters
- -checkpointDesc
- Specifies a description of the full checkpoint. (String, optional)
Batch mode example usage
- Using Jython string:
AdminTask.createFullCheckpoint('[-checkpointName full2 -checkpointDesc "a test"]')
- Using Jython list:
AdminTask.createFullCheckpoint(['-checkpointName', 'full2'])
Interactive mode example usage
- Using Jython:
AdminTask.createFullCheckpoint('[-interactive]')
deleteCheckpoint
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
- -checkpointName
- Specifies the name of the checkpoint to delete. You can specify
the name of any full checkpoint to delete. (String, required)Note: To delete a delta checkpoint, you must specify the name of the oldest delta checkpoint.
Optional parameters
None
Batch mode example usage
- Using Jython string:
AdminTask.deleteCheckpoint('[-checkpointName full2]')
- Using Jython list:
AdminTask.deleteCheckpoint(['-checkpointName', 'full2'])
Interactive mode example usage
- Using Jython:
AdminTask.deleteCheckpoint('[-interactive]')
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
- Specifies the name of the repository checkpoint to extract. You can extract only a delta repository checkpoint. (String, required)
- -extractToFile
- Specifies the 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
- Using Jython string:
AdminTask.extractRepositoryCheckpoint('[-checkpointName Delta-132 -extractToFile /temp/test1.zip]')
AdminTask.extractRepositoryCheckpoint('[-checkpointName Delta-132 -extractToFile c:/temp/test1.zip]')
- Using Jython list:
AdminTask.extractRepositoryCheckpoint(['-checkpointName', 'Delta2', '-extractToFile', '/temp/test1.zip'])
AdminTask.extractRepositoryCheckpoint(['-checkpointName', 'Delta2', '-extractToFile', 'c:/temp/test1.zip'])
Interactive mode example usage
- Using Jython:
AdminTask.extractRepositoryCheckpoint('[-interactive]')
getAutoCheckpointDepth
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()
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
print AdminTask.getAutoCheckpointEnabled()
getCheckpointLocation
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()
getConfigRepositoryLocation
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()
listCheckpoints
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)
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
- Specifies the name of the checkpoint to search for a list of documents. (String, required)
Optional parameters
None
Batch mode example usage
- Using Jython string:
AdminTask.listCheckpointDocuments('[-checkpointName Delta-132]')
- Using Jython list:
AdminTask.listCheckpointDocuments(['-checkpointName', 'Delta-132'])
Interactive mode example usage
- Using Jython:
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)
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.
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
- -checkpointName
- Specifies the name of the checkpoint to restore. (String, required)
Optional parameters
None
Batch mode example usage
- Using Jython string:
AdminTask.restoreCheckpoint('[-checkpointName Delta-132]')
- Using Jython list:
AdminTask.restoreCheckpoint(['-checkpointName', 'Delta-132'])
Interactive mode example usage
- Using Jython:
AdminTask.restoreCheckpoint('[-interactive]')
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
- Specifies the number of automatic delta checkpoints to keep. (Integer, required)
Optional parameters
None
Batch mode example usage
- Using Jython string:
AdminTask.setAutoCheckpointDepth('[-autoCheckpointDepth 5]')
- Using Jython list:
AdminTask.setAutoCheckpointDepth(['-autoCheckpointDepth', '5'])
Interactive mode example usage
- Using Jython:
AdminTask.setAutoCheckpointDepth('[-interactive]')
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. 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
- -autoCheckpointEnabled
- Specifies whether to save the product configuration before a configuration
change automatically to a repository checkpoint. A
true
value enables automatic checkpoints. Afalse
value, the default, disables automatic checkpoints. (Boolean, required)
Optional parameters
None
Batch mode example usage
- Using Jython string:
AdminTask.setAutoCheckpointEnabled('[-autoCheckpointEnabled true]')
- Using Jython list:
AdminTask.setAutoCheckpointEnabled(['-autoCheckpointEnabled', 'true'])
Interactive mode example usage
- Using Jython:
AdminTask.setAutoCheckpointEnabled('[-interactive]')
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
- Specifies the directory path where checkpoints are stored. (String, required)
Optional parameters
None
Batch mode example usage
- Using Jython string:
AdminTask.setCheckpointLocation('[-checkpointLocation ${USER_INSTALL_ROOT}/checkpoints/temp]')
- Using Jython list:
AdminTask.setCheckpointLocation(['-checkpointLocation', '${USER_INSTALL_ROOT}/checkpoints/temp'])
Interactive mode example usage
- Using Jython:
AdminTask.setCheckpointLocation('[-interactive]')