Migrating MultiExcerpt from Server/Data Center to Cloud

The Server/Data Center to Cloud migration of the MultiExcerpt macro can be performed without any loss of service for your macros on your Server or Cloud instances. 

The MultiExcerpt macros have different names on Cloud than they do on Server/Data Center. For example, the "multiexcerpt" macro on Server/Data Center is "multiexcerpt-macro" on Cloud. In addition, the macros have a few parameters whose names need to be changed.

You will perform a migration with no loss of service on your Server/Data Center by enabling app/macro modules (on Server/Data Center) that use the MultiExcerpt macro names for MultiExcerpt-Cloud.  

Enabling these app modules will allow you to rename your MultiExcerpt macros (on Server/Data Center) by editing them in your Confluence Storage Format XML (SFXML) representation of your pages. During this renaming process, the MultiExcerpt macros will work on your Server/Data Center while using either the Server/Data Center or the Cloud macro names. After the renaming is completed for all pages you can migrate your pages from Server/Data Center to Cloud.  The pages are immediately ready for service on your Cloud instance.

Note: there is no Cloud equivalent of the Server/Data Center macro for MultiExcerpt Enhanced Permissions so you will need to think about your strategy for Cloud excerpting of restricted resources before you do this migration.



Instructions


  1. On your SERVER/DATA CENTER: enable the MultiExcerpt modules for MultiExcerpt macros with Cloud names 

    1. Navigate to 'Manage apps'
      1. Confluence Admin > Manage apps
    2. Expand the section for your Multiexcerpt plugin
    3. Expand the 'modules' section within the Multiexcerpt plugin section
    4. Enable these two modules to turn on the macro names that will be used in Cloud:
      1. multiexcerpt-macro (xhtml-multiexcerpt-macro)

      2. multiexcerpt-include-macro(xhtml-multiexcerpt-include-macro)

      3. Note: there is no Cloud equivalent of the Server/Data Center macro for MultiExcerpt Enhanced Permissions

    5. Leave these two modules enabled, they use the Server/Data Center macro names and will allow you to continue to use both names on your Server/Data Center instance during the migration effort:
      1. multiexcerpt (xhtml-multiexcerpt)

      2. multiexcerpt-include (xhtml-multiexcerpt-include)

  2. On your SERVER/DATA CENTER: search/replace the Server/Data Center macro names to replace with Cloud macro names in the page Storage Format markup.  Also search/replace the PageWithExcerpt and MultiExcerptName macro parameters to use the Cloud names.

    Search ForReplace With
    "multiexcerpt""multiexcerpt-macro"
    "multiexcerpt-include""multiexcerpt-include-macro"
    "PageWithExcerpt""page"
    "MultiExcerptName""name"
    1. The "PageWithExcerpt" and "MultiExcerptName" are parameters for the "multiexcerpt-include" macro.  You will see those parameters when you find a "multiexcerpt-macro".
    2. Atlassian has a free app for editing Storage Format markup: Confluence Source Editor
    3. The advanced search tool in Confluence allows you to invoke CQL queries to find pages with macros on them:
    4. The Search and Replace app may make this easier than doing it manually. We are not affiliated with the Search and Replace app nor the vendor. 
  3. Migrate your content from Server/Data Center to Cloud

    1. Export Confluence pages as XML from Confluence Server/Data Center and import into Confluence Cloud
    2. Atlassian Confluence Support References:
      1. Cloud Migration Assistant for Confluence
      2. Migrate from Confluence Server to Cloud
    3. Artemis reference for export/import:
      1. Export Space or Pages for Troubleshooting
    4. As of early 2021 pages that are exported from Server and imported to Cloud are created as "legacy" pages in Cloud, not "new/fabric" pages
  4. Limitations

    1. Confluence Cloud does not have feature parity with Confluence Server. Some of the oddities/limitations of Confluence Cloud that affect MultiExcerpt are listed here:
      1. Cloud does not allow 3rd party ("Connect") macros to be nested within each other.  This Confluence Cloud limitation is for all types of pages (legacy and new).  Therefore, you cannot nest a MultiExcerpt within a MultiExcerpt in Cloud even though you could in Server:
        1. Summary of Problems for Nesting Macros in Confluence Cloud
      2. Confluence Cloud does not give 3rd party macros the ability to get the CSS stylesheet for the parent page so there are numerous styling oddities with 3rd party macros in Cloud
        1. We are pursuing this with Atlassian, trying to get them to provide 3rd party apps with an API for getting the CSS stylesheet
          1. https://artemis.atlassian.net/projects/MEPOD/issues/MEPOD-52
          2. https://jira.atlassian.com/browse/CONFCLOUD-69625
      3. Many of the problems in Cloud are related to "new/fabric" pages and are not a problem for legacy (old) pages. Be aware of this if you decide to convert your imported pages from legacy to new.
        1. You should be aware that Atlassian will have a "reminder" to convert the page from a legacy (old) page to a new one when you open the page to edit it for the first time.

If Server Was Migrated to Cloud Without Editing Multiexcerpt Macros

If your Server site was migrated to Cloud without following the above steps to edit your Storage Format markup then the macros will not be recognized in Cloud:



If that has happened and you catch it immediately, before your Cloud site is open for production usage, then you may want to stop and redo your Server → Cloud migration and follow the above steps for editing your macros BEFORE importing to Cloud.

If redoing your migration is not an option then you must edit the Storage Format on your Cloud instance to change the macros so they are recognized:

Search ForReplace With
"multiexcerpt""multiexcerpt-macro"
"multiexcerpt-include""multiexcerpt-include-macro"
"PageWithExcerpt""page"
"MultiExcerptName""name"

The "PageWithExcerpt" and "MultiExcerptName" are parameters for the "multiexcerpt-include" macro.  You will see those parameters when you find a "multiexcerpt-macro".

Our Storage Editor plugin is an example of a tool that can be used to edit Storage Format in Cloud.

You will need to find all of the pages that contain "multiexcerpt" and "multiexcerpt-include" macros so you can edit the Storage Format on those pages.

The Confluence Cloud search API is not usable for finding the pages with "multiexcerpt" and "multiexcerpt-include" macros.  CQL can only find macros that are successfully installed on your instance.  It can find "multiexcerpt-macro" macros on Cloud because that is a valid macro that you can and will install on your Cloud instance.  However, it cannot find "multiexcerpt" macros that you have imported in your markup from your Server instance.  In addition to the limitations of CQL searches, the search API in Cloud is significantly buggy and is not reliable for finding macros in Cloud sites.

If your site is large enough that you cannot find the broken MultiExcerpt macros manually by navigating your site then you may want to consider doing the search on your SERVER instance and then use those results to know which pages need editing on your Cloud instance.  The advanced search (using CQL) to find macros is reliable on Server:


Licensing

Atlassian has some guidance on the licensing policies for migrations here: Transfer your self-hosted license to cloud

See the section entitled "App licenses". The policy for app licenses is that there is no transfer or credit from Server/Data Center towards a Cloud license (sorry). 

Application vendors rely on Atlassian for licensing and purchasing, for which Atlassian charges a percentage of the license fee. We are always happy to hear feedback on licensing policies but be aware that they are set and controlled by Atlassian and that feedback given directly to them about their policies is probably the best way to get it heard by the folks who set the policies. 

Related articles