---
title: "Step 1 - Prepare for the migration"
canonical: "https://support.appfire.com/space/CT/1561201208/Step%201%20-%20Prepare%20for%20the%20migration"
format: markdown
---
> Macro (aura-html)

# Prerequisites

- Review [https://appfire.atlassian.net/wiki/spaces/CTFCSM/pages/1561725231](https://appfire.atlassian.net/wiki/spaces/CTFCSM/pages/1561725231).
- Understand the [feature differences](https://appfire.atlassian.net/wiki/spaces/CTFCSM/pages/1561201095) between Composition Tabs for Confluence Data Center and Confluence Cloud.

# Guide

## 1. Upgrade the Composition Tabs app

Update the Composition Tabs app to the latest version or at least to version **5.14.1 **using the UPM inside the Confluence administration console.

1. Select **Administration **(⚙️) > **Manage apps**.
2. Search for *Composition Tabs*** **and make sure that the app is updated.

## 2. Find all the Composition Tabs macros

Choose one of the options below to assess data compatibility between Composition Tabs Data Center and Cloud.

### Option 1: Use the *Macro Usage* page

The *Macro Usage* page can show you the number of Composition Tabs macros on your site and the pages that contain them.

1. Select **Administration **( ⚙️ ) > **General Configuration**.
2. In the left sidebar, under *Administration*, click* ***Macro Usage.**

> ℹ️ You can also access the macro usage information using the shortcut ** **`<base-url>/admin/pluginusage.action`.

3. Locate the macros under *Composition***.**
4. Record the number of Composition macros on your site.
5. Identify how many macros need action and how many macros cannot be migrated.
  - For the Deck of Cards and Card macros, you must run our pre-migration tool. See Step 3 later on this page.
  - For the macros that cannot be migrated, alert users to take the next actions if needed. (The SQL method in Option 2 below may be more helpful in this regard, as it can also provide hints about the authors of this content.)
6. Click each macro link to view the pages containing the corresponding macro.

### Option 2: Use a SQL query

Use the sample SQL query below to get all pages that contain non-migratable Composition macros.

> ℹ️ This example uses PostgreSQL query syntax. You must adjust usage according to your database syntax. Also, to avoid performance issues, limit the outcome to a smaller scope if needed (using limit can help).

<details>
<summary>SQL query to find impacted pages...</summary>

```
select s.spacekey, s.spacename, c.title as "Page Title", um.username
from content c, spaces s, user_mapping um left join cwd_user cu on um.username = cu.user_name
where c.spaceid = s.spaceid and c.contenttype = 'PAGE' and c.prevver is null and c.content_status = 'current'
and c.creator = um.user_key
and c.title in
(SELECT c.title
FROM CONTENT c
JOIN BODYCONTENT bc
    ON c.contentid = bc.contentid
JOIN SPACES s
    ON c.spaceid = s.spaceid
WHERE c.prevver IS NULL
    AND c.contenttype IN ('PAGE', 'BLOGPOST')
    AND bc.body LIKE '%ac:name="banner"%'
        or bc.body LIKE '%ac:name="composition-setup"%'
        or bc.body LIKE '%ac:name="cloak"%'
        or bc.body LIKE '%ac:name="toggle-cloak"%'
        or bc.body LIKE '%ac:name="float"%'
        or bc.body LIKE '%ac:name="show-card"%')
order by s.spacekey, c.title
```
</details>

## 3. Run the pre-migration tool

To prepare your tabbed content for the migration, you must run the Apfire pre-migration tool to convert the Deck of Cards and Card macros to Group of Tabs and Tab macros.

> ℹ️ This is a **prerequisite** step for Confluence Data Center users who are planning to migrate to Confluence Cloud and have pages that use the** **[Deck of Cards](https://appfire.atlassian.net/wiki/spaces/CTFCSM/pages/1562607623)** **and[ Card ](https://appfire.atlassian.net/wiki/spaces/CTFCSM/pages/1562509352)macros from Composition Tabs.

- Pre-migration overview
  - These pre-migration steps in this article are crucial for avoiding clashes with similarly named macros on Confluence Cloud. On Cloud, there are currently Confluence-native macros that are also called Deck and Card (these are not Appfire macros). This [bug ](https://jira.atlassian.com/browse/CONFCLOUD-70962)report provides more details.
  - As part of the migration process, an Appfire pre-migration tool is available which can rename all Deck and Card macros to **Tab Group** and **Tab** macros. On Confluence Data Center, **Tab Group** and  **Tab** macros behave exactly the same way as **Deck** and **Card** macros previously do, but with a different name.
  - Once this process is completed, administrators can then run the  [Confluence Cloud Migration Assistant](https://marketplace.atlassian.com/apps/1219672/confluence-cloud-migration-assistant?hosting=server&tab=overview) <span style="color: #000000">to migrate all their content to Confluence Cloud.</span>
- What happens during this process?
  - All content that contains <span style="color: #000000">**Deck of Cards**</span><span style="color: #000000"> and </span><span style="color: #000000">**Card**</span><span style="color: #000000"> macros,</span> including pages and comments, will be updated to the new macro names, [Tab Group](https://appfire.atlassian.net/wiki/spaces/CTFCSM/pages/1562607835) and [Tab](https://appfire.atlassian.net/wiki/spaces/CTFCSM/pages/1562020446).
  - After the macros are renamed, your content will be displayed as it was previously. You can still view, edit and use your updated tabbed content as before on this site.

| **Before** | **After** |
| --- | --- |
| ![image](media://a13c3908-8770-41de-b9df-a71a8a0cd848) | ![image](media://398fe2a3-f393-4ff0-ac8d-07262df9db95) |

> ℹ️ If new **Deck of Cards** and **Card** macros are created after the rename process, you must run the pre-migration tool again before migrating to Confluence Cloud. For example, if you have completed this process for migration test purposes, but your users continue to add new content with **Deck of Cards** and **Card** macros, you must run the tool again before performing the production migration.

> ❌ Pre-cloud migration is disabled for the latest version of Composition Tabs. If you wish to migrate to cloud, it’s suggested to use v5.14.14 with Confluence 7 instead. Refer to [Cannot find pre-migration tool for Composition Tabs](https://appfire.atlassian.net/wiki/spaces/CTFCSM/pages/1562443837)  for more information.

1. Go to the *Confluence Admininstration* console.
2. Under *Composition Configuration*, select **Composition Cloud Pre-migration Tool**.
3. Review the *Composition Cloud Pre-migration Setup* page.
  The page diplsays the following information:
  - **Previous run **(appears after the first run of the pre-migration tool): The date and time of the last run.
  - **Number of contents to update:** The number of pages that still use the **Deck of Cards** and **Card** naming convention.
  - **Number of contents updated**: Accumulated total number of pages with renamed macros.
4. Click **Run update**.  
The button becomes greyed out, and a spinner indicates that the macro rename process is in progress.

> ✅ The pre-migration tool runs as a background job so you can perform other tasks in your Confluence instance. If you need a more detailed status update, you can track the Confluence log file, `atlassian-confluence.log`. For more details, refer to [https://appfire.atlassian.net/wiki/spaces/CTFCSM/pages/1562280505](https://appfire.atlassian.net/wiki/spaces/CTFCSM/pages/1562280505).

When the process completes:

- The information on the *Composition Cloud Prei-migration Setup* page updates.
- All updated pages have a new entry under *Page History* with the comment *Composition Migrator: Convert Deck and Card macros to Tab & Tab Group macros*.