Rolling back to a snapshot

You can roll back a component to the versions that are in a snapshot. In this case, you use a Rollback Component step with the Remove Undesired Incremental Versions option.

Before you begin

About this task

For a video demo of rolling back components, see Rollback Scenarios in IBM UrbanCode™ Deploy .

When you roll back to a snapshot in this way, the server runs the uninstallation process for each component version that is not in the snapshot. The server runs the uninstallation processes in the reverse order in which it deployed the versions, starting with the most recently deployed version and ending with the version that was deployed first. Only the versions in the snapshot are left on the environment.

This method is intended to uninstall incremental versions, but you can also use it to uninstall full versions. However, for full versions, in many cases, it is simpler to install the new full version over the existing full and incremental versions.

This method works best for component versions that are already deployed, regardless of whether the deployments of those versions were completed. As an alternative, you can add a step that immediately rolls back deployments of versions that were not completed; for that method, see Rolling back components that fail to deploy.

Procedure

  • To roll back one or more components to the versions that are in a snapshot, complete these steps:
    1. Create an application process with a name such as "Roll back to snapshot."
    2. In the application process, add one or more Rollback Component steps, one for each component to roll back.
    3. In the properties for each Rollback Component step, specify the following information:
      Component
      Specify the component to roll back.
      Component Process
      Specify the uninstall process for the component.
      Rollback Type
      Select Remove Undesired Incremental Versions.
    4. Connect the steps in the process in the order for them to run in. The following diagram shows a typical application process that includes a Rollback Component step. This application process is designed to roll back the three components in the application. Two components use an Install Application step that redeploys an earlier component version. The other component, the JPetStore-DB database component, uses a rollback step to roll back the incremental component version. This step uses the Remove Undesired Incremental Versions option and an uninstall-type component process.
      An application process that includes a Rollback Component step.
    5. Run the application process and specify the snapshot to roll back to. If you are rolling back by redeploying an existing version, be sure to clear the Only Changed Versions check box, or else the process does not redeploy the version.

    Results

    The process uses the snapshot to determine which component versions to roll back. In each step with the Remove Undesired Incremental Versions option, versions that are not in the snapshot are removed.

    Feedback