1 Reply Latest reply on Oct 15, 2012 8:09 PM by Sham HC

    How to rollback the installation of a content package?

    Jonas Oskö

      Dear Community,

       

      We are using CQ 5.4 on my current assignment and I have a (hopefully trivial :) question concerning deployment/rollback best practices.

       

      Assume I have a content package ContentPackageA.zip which contains:

      • /etc/packages/com.somesite/ContentPackageB.zip
      • /apps/somesite/install/someservice.jar

       

      The subpackage ContentPackageB contains:

      • /content/somesite/somepage
      • /content/somesite/somepage/somechildpage
      • /etc/tags/somesite/sometag

       

      To install this in my environment I will do the following:

       

      1. Open CRX Package Manager on my Author instance
      2. Upload ContentPackageA.zip
      3. Make sure the setting 'Extract Subpackages' is checked and install ContentPackageA.zip
      4. Open the Tools Admin interface
      5. Browse to /etc/packages/com.somesite/
      6. Activate ContentPackageA.zip

       

      Now my environment, both Author and Publish instances, contains all the new nodes included in the content packages: ContentPackageA.zip and subpackage ContentPackageB.zip

       

      Assume now that I want to rollback this deployment. I will then do the following:

       

      1. Open the Tools Admin interface
      2. Browse to /etc/packages/com.somesite/
      3. Deactivate ContentPackageA.zip
      4. Open CRX Package Manager on my Author instance
      5. Uninstall ContentPackageA.zip
      6. Delete ContentPackageA.zip (optional I guess)

       

      My experience is that this procedure does not work entirely. The resulting state is:

       

      • On the Author instance, everything is removed, i.e. both packages and package contents
      • On Publish instance, only one package is removed: /etc/packages/com.somesite/ContentPackageA.zip
      • The subpackage remains: /etc/packages/com.somesite/ContentPackageB.zip
      • The package contents remains as well from both ContentPackageA.zip and ContentPackageB.zip

       

      My questions are:

       

      • What are the best practices to perform a rollback from both Author and Publish instances?
      • Is deactivation of a package supposed to delete package contents and deactive subpackages?
      • Are there any changes in CQ 5.5 regarding this?

       

      Thanks for the support!

       

      Best regards,

      Jonas Oskö

        • 1. Re: How to rollback the installation of a content package?
          Sham HC Level 7

          Currently OOB we do not have option that by deactivate it uninstall package.  The enhancement request is in place & not yet considered for future release. Please file daycare with business impact & valid usecase.

          You might not use this feature more often right ?  During your code deployment if you wan't to rollback you can restore from the backup that you had before deployment.

          If repository is big & restore is not an option. As a workaround You need to uninstall the package from publish before deactivate. This can be achieved through script using curl.