---
title: "Pre-migration process for HTML macro"
canonical: "https://support.appfire.com/space/HTML/70615177/Pre-migration%20process%20for%20HTML%20macro"
format: markdown
---
<span style="color: #000000">This article contains information about the process and checks to be performed before migrating the </span><span style="color: #000000">*HTML*</span><span style="color: #000000"> macro content from server to cloud. </span>

Due to restrictions in Confluence cloud, the *HTML *macro name must be changed to *HTML-bobswift*. Use *Migration to Confluence Cloud* in HTML for Confluence Configuration to initiate a process that automatically updates the macro name to prepare your content for migration.

<span style="color: #000000"> Once this process is completed, administrators can run the </span><span style="color: #000000">[Confluence Cloud Migration Assistant](https://marketplace.atlassian.com/apps/1219672/confluence-cloud-migration-assistant?hosting=server&tab=overview)</span><span style="color: #000000"> to migrate all your content to Confluence cloud.</span>

> ℹ️ <span style="color: #000000">With the introduction of the </span><span style="color: #000000">*HTML*</span><span style="color: #000000"> macro name update process, the macro name is now updated from </span><span style="color: #000000">*HTML*</span><span style="color: #000000"> to </span><span style="color: #000000">*HTML-bobswift*</span><span style="color: #000000"> for all comments, pages, and/or templates.</span>

<span style="color: #000000">This article contains the relevant information required </span>to transition HTML content from server to cloud seamlessly<span style="color: #000000">.</span>

## <span style="color: #000000">Instructions</span>

<span style="color: #000000">The instructions are divided into two parts: </span>understanding how many comments, pages, and/or templates need updates and running the actual update process<span style="color: #000000">. The first part merely allows administrators to check for any errors or mismatches in the number of updates made in the second part.</span>

### <span style="color: #000000">See how many comments, pages, and/or templates in your instance require the </span><span style="color: #000000">*HTML*</span><span style="color: #000000"> macro name update</span>

1. <span style="color: #000000">Select </span>> Macro (inline-media-image)

<span style="color: #000000"> </span><span style="color: #000000">***> Administration > Macro usage***</span><span style="color: #000000">, or search for </span><span style="color: #000000">*Macro usage*</span><span style="color: #000000">.</span>
2. <span style="color: #000000">Scroll down to </span><span style="color: #000000">*Bob Swift Atlassian Apps - HTML*</span><span style="color: #000000"> and see the number of pages mentioned for the </span><span style="color: #000000">*html*</span><span style="color: #000000"> entry.</span>

<span style="color: #000000">This is the number of comments, pages, and/or templates that require the </span><span style="color: #000000">*HTML*</span><span style="color: #000000"> macro name change.</span>

<span style="color: #000000">Before migration:</span>

![Image shows the number of pages that require the macro name change.](media://5e9b0844-bed3-4d08-b88a-9c1fb5ffa75f)

After migration:

![Image shows the number of pages that were changed after the macro name change.](media://7220853c-9de2-4d3c-9ffb-b38e637bfeb4)

> ✅ *How do you confirm if all pages and/or templates are updated?*
> ✅ 
> ✅ <span style="color: #000000">After completing this update process, you can revisit the Macro usage page to verify that all the required comments, pages, and/or templates that use the </span><span style="color: #000000">*HTML*</span><span style="color: #000000"> macro name are updated. This may take a few seconds depending on the total number of comments, pages, and templates that were affected due to the update process.</span>

### <span style="color: #000000">Update the macro name from </span><span style="color: #000000">*HTML*</span><span style="color: #000000"> to </span><span style="color: #000000">*HTML-bobswift*</span><span style="color: #000000"> on all relevant comments, pages, and templates in your instance</span>

1. <span style="color: #000000">Select </span>> Macro (inline-media-image)

<span style="color: #000000"> ></span><span style="color: #000000">** Manage apps**</span><span style="color: #000000">.</span>
2. <span style="color: #000000">Search for </span><span style="color: #000000">*HTML for Confluence*</span><span style="color: #000000"> or scroll to </span><span style="color: #000000">*Bob Swift Configuration, *</span><span style="color: #000000">and click </span><span style="color: #000000">*HTML*</span><span style="color: #000000"> to view app configuration. </span>This opens the HTML for Confluence Configuration page.

> ✅ *Try this for older Confluence versions!*
> ✅ 
> ✅ Navigate to **CONFLUENCE ADMINISTRATION **>** Settings **>** ATLASSIAN MARKETPLACE **> **HTML** >** Profiles**.

3. <span style="color: #000000">Select </span><span style="color: #000000">*Migrate to Confluence Cloud*</span><span style="color: #008000">. </span><span style="color: #172b4d">This tab displays information about the macro </span>name<span style="color: #172b4d"> update process.</span>
4. <span style="color: #000000">Click </span><span style="color: #000000">**Macro upgrade status**</span><span style="color: #000000"> to know more about </span><span style="color: #000000">*HTML*</span><span style="color: #000000"> macro usage in your instance. Until the previous release, these statistics were shown directly before the next step. </span>
5. <span style="color: #000000">Click </span><span style="color: #000000">**Update pages**</span><span style="color: #000000"> to start the update process. </span>
6. <span style="color: #000000">After the update process is completed, the macro usage information on the page is updated. These updates can be verified through the Macro usage page as mentioned in the previous section. </span>

> ℹ️ <span style="color: #000000">Administrators must still run the </span><span style="color: #000000">[Confluence Cloud Migration Assistant](https://marketplace.atlassian.com/apps/1219672/confluence-cloud-migration-assistant?hosting=server&tab=overview)</span><span style="color: #000000"> to complete the migration from server to cloud. This is because the update process does not actually migrate the HTML content, but simply </span><span style="color: #172b4d">updates the macro name across all your </span><span style="color: #000000">comments, </span><span style="color: #172b4d">pages and templates in server/Data Center to match the macro name in cloud.</span>

## <span style="color: #000000">Troubleshoot issue</span>

<span style="color: #000000">There is a known issue where the pre-migration process stalls when migrating huge loads. If an issue occurs with the migration tool, you can update the database directly as a workaround. Try executing the following queries:</span>

```sql
-- This is to pull all the records with given macro it could be html or html-bobswift

SELECT  distinct s.spaceid,s.spacekey 
FROM CONTENT c
JOIN BODYCONTENT bc
	ON c.contentid = bc.contentid
JOIN SPACES s
	ON c.spaceid = s.spaceid
WHERE 
	c.contenttype IN ('PAGE', 'BLOGPOST', 'COMMENT')
	AND bc.body LIKE '%ac:name="html"%';



-- Update html with html-bobswift 

UPDATE bodycontent
SET body = replace(body,'ac:name="html"','ac:name="html-bobswift"') 
WHERE bodycontentid in (
  SELECT bc.bodycontentid
  FROM CONTENT c
  JOIN BODYCONTENT bc
      ON c.contentid = bc.contentid
  WHERE c.contenttype IN ('PAGE', 'BLOGPOST', 'COMMENT')
    AND bc.body LIKE '%ac:name="html"%'
)
;
```