+

Search Tips   |   Advanced Search

RepositoryCheckpointCommands command group (AdminTask)

Use the Jython or Jacl scripting language to create, restore, delete, and administer checkpoints with wsadmin.sh. 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 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,

when a configuration change is made, WAS creates a delta checkpoint automatically, which is saved to the configuration repository...

WAS stores the configuration repository in...

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

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

  • Jython string...

      AdminTask.createFullCheckpoint('[-checkpointName full2 -checkpointDesc "a test"]')

  • Jython list:

      AdminTask.createFullCheckpoint(['-checkpointName', 'full2'])

Interactive mode

  • Jython:

      AdminTask.createFullCheckpoint('[-interactive]')


deleteCheckpoint

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)

To delete a delta checkpoint, specify the name of the oldest delta checkpoint.

Optional parameters: None

Batch mode example

  • Jython string...

      AdminTask.deleteCheckpoint('[-checkpointName full2]')

  • Jython list:

      AdminTask.deleteCheckpoint(['-checkpointName', 'full2'])

Interactive mode

  • Jython:

      AdminTask.deleteCheckpoint('[-interactive]')


extractRepositoryCheckpoint

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

  • Jython string...


    (zos)

      AdminTask.extractRepositoryCheckpoint('[-checkpointName Delta-132 -extractToFile /temp/test1.zip]')


      AdminTask.extractRepositoryCheckpoint('[-checkpointName Delta-132 -extractToFile c:/temp/test1.zip]')

  • Jython list:

      AdminTask.extractRepositoryCheckpoint(['-checkpointName', 'Delta2', '-extractToFile', '/temp/test1.zip'])


      AdminTask.extractRepositoryCheckpoint(['-checkpointName', 'Delta2', '-extractToFile', 'c:/temp/test1.zip'])

Interactive mode

  • Jython:

      AdminTask.extractRepositoryCheckpoint('[-interactive]')


getAutoCheckpointDepth

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

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

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

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

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

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

Batch mode example

  • Jython string...

      AdminTask.listCheckpointDocuments('[-checkpointName Delta-132]')

  • Jython list:

      AdminTask.listCheckpointDocuments(['-checkpointName', 'Delta-132'])

Interactive mode

  • 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

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.

After the configuration repository is restored from a delta checkpoint, the product creates a checkpoint containing the configuration before restoration.

Avoid trouble: 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 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. To increase the number of saved delta checkpoints, use the setAutoCheckpointDepth command.gotcha

When you restore a checkpoint, save conflicts occur if we have uncommitted changes in the 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

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

Optional parameters: None

Batch mode example

  • Jython string...

      AdminTask.restoreCheckpoint('[-checkpointName Delta-132]')

  • Jython list:

      AdminTask.restoreCheckpoint(['-checkpointName', 'Delta-132'])

Interactive mode

  • Jython:

      AdminTask.restoreCheckpoint('[-interactive]')


setAutoCheckpointDepth

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

Batch mode example

  • Jython string...

      AdminTask.setAutoCheckpointDepth('[-autoCheckpointDepth 5]')

  • Jython list:

      AdminTask.setAutoCheckpointDepth(['-autoCheckpointDepth', '5'])

Interactive mode

  • Jython:

      AdminTask.setAutoCheckpointDepth('[-interactive]')


setAutoCheckpointEnabled

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

Batch mode example

  • Jython string...

      AdminTask.setAutoCheckpointEnabled('[-autoCheckpointEnabled true]')

  • Jython list:

      AdminTask.setAutoCheckpointEnabled(['-autoCheckpointEnabled', 'true'])

Interactive mode

  • Jython:

      AdminTask.setAutoCheckpointEnabled('[-interactive]')


setCheckpointLocation

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

Batch mode example

  • Jython string...

      AdminTask.setCheckpointLocation('[-checkpointLocation ${USER_INSTALL_ROOT}/checkpoints/temp]')

  • Jython list:

      AdminTask.setCheckpointLocation(['-checkpointLocation', '${USER_INSTALL_ROOT}/checkpoints/temp'])

Interactive mode

  • Jython:

      AdminTask.setCheckpointLocation('[-interactive]')


Related tasks

  • Configure checkpoints
  • Restore checkpoints