Fulstech - Jira and Confluence Add-on Developer
ProductsSecurity PolicyPrivacy PolicyEULASLA
  • 🏠Home
  • Markdown
    • Markdown Editor for Jira (Markin)
      • Jira Cloud
        • Overview
        • Create a Markdown-enabled Custom Field
        • Markdown Syntax
        • Support
      • Jira Data Center and Jira Server
        • Overview
        • Create a Markdown-enabled Field
        • Markdown Syntax
        • Migrate to Jira Cloud
        • Support
    • Markdown for Confluence
      • Confluence Cloud
        • Overview
        • Usage
        • Support
  • LaTeX
    • LaTeX for Jira - Math Editor
      • Jira Cloud
        • Overview
        • Usage (with browser extension)
        • Usage (without browser extension)
        • Support
      • Jira Data Center and Jira Server
        • Overview
        • Usage
        • Support
    • LaTeX for Confluence with Math Editor and Plotting
      • Confluence Cloud
        • Overview
        • Usage
        • Migrate from Confluence Server and Confluence Data Center
        • Support
      • Confluence Data Center and Confluence Server
        • Overview
        • Usage (from version 4.0.0)
        • How to install TeX Live
        • Migrate to Confluence Cloud
        • Troubleshooting "Unknown macro" error
        • Support
        • (Deprecated) Usage (for version older than 4.0.0)
  • Whiteboarding and Diagramming
    • Mermaid UML Diagrams and Graphviz Diagrams for Jira
      • Jira Cloud
        • Overview
        • Usage
        • Support
      • Jira Data Center and Jira Server
        • Overview
        • Usage
        • Announcement of the Data Center version
        • Support
    • Excalidraw for Jira
      • Jira Cloud
        • Overview
        • Usage
        • Support
    • Excalidraw for Confluence - with Mermaid, PlantUML, and Graphviz
      • Confluence Cloud
        • Overview
        • Usage
        • Support
      • Confluence Data Center and Confluence Server
        • Overview
        • Usage
        • Support
    • PlantUML, Mermaid UML, Graphviz: UML Diagrams for Confluence
      • Confluence Cloud
        • Overview
        • Usage
        • Support
      • Confluence Data Center and Confluence Server
        • Overview
        • Usage
        • Support
    • Mind Mapping for Confluence
      • Confluence Cloud
        • Overview
        • Usage
        • Support
    • User Flow (Wireflow) for Confluence
      • Confluence Cloud
        • Overview
        • Usage
        • Support
  • Custom Fields
    • Table Custom Field for Jira Cloud
      • Overview
      • Usage
      • Support
    • JEditor-compatible custom field for Jira Cloud
      • Jira Cloud
        • Overview
        • Create a JEditor-compatible Custom Field
        • Migrate to Jira Cloud
        • Support
    • Checklist for Jira Server
      • Overview
      • Usage
      • Support
  • Security Policy
  • Privacy Policy
  • End User License Agreement
  • Service Level Agreement (SLA)
  • Archived Apps
    • Better font for Jira Server
      • Overview
      • Usage
      • Support
Powered by GitBook
On this page
  • (Optional) Get a report on the pages using the macros
  • Stop Confluence
  • Stop the Synchrony process
  • Update data
  • All necessary queries for easy copying-and-pasting
  • Explanation of the above queries
  • Start the Synchrony process
  • Start Confluence

Was this helpful?

  1. LaTeX
  2. LaTeX for Confluence with Math Editor and Plotting
  3. Confluence Data Center and Confluence Server

Migrate to Confluence Cloud

PreviousHow to install TeX LiveNextTroubleshooting "Unknown macro" error

Last updated 4 months ago

Was this helpful?

This migration step is ONLY necessary for the pre-4.0.0 versions of this app.

If the Confluence Server or Data Center instance has never run a version older than 4.0.0, this migration process is not necessary.

Since there are differences between rules for macro names between Confluence Cloud and Confluence Data Center/Server, the macro names have to be modified in the database before the migration to Confluence Cloud takes place.

The following guideline is based on an . After finish all steps, you can follow this to import the data from Confluence Data Center/Server to Confluence Cloud.

(Optional) Get a report on the pages using the macros

The following SQL query provides this information from the latest (current) version of pages using the old macros. This is targeting pages, blog posts, and page comments.

LaTeX block macro

SELECT c.contentid, c.contenttype, c.title, s.spacekey
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', 'COMMENT')
    AND bc.body LIKE '%ac:name="LaTeX block"%';

LaTeX inline macro

SELECT c.contentid, c.contenttype, c.title, s.spacekey
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', 'COMMENT')
    AND bc.body LIKE '%ac:name="LaTeX inline"%';

LaTeX block macro

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

LaTeX inline macro

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

Stop Confluence

Stop Confluence following your standard procedure. If running Confluence Data Center, stop Confluence on all nodes.

Stop the Synchrony process

Update data

All necessary queries for easy copying-and-pasting

update CONTENTPROPERTIES
set stringval = 'synchrony-recovery'
where CONTENTID IN (SELECT c.contentid
  FROM CONTENT c
  JOIN BODYCONTENT bc
    ON c.contentid = bc.contentid
  JOIN SPACES s
    ON c.spaceid = s.spaceid
  WHERE c.content_status = 'draft'
    AND c.contenttype IN ('PAGE', 'BLOGPOST')
    AND bc.body LIKE '%ac:name="LaTeX block"%'
)
   AND propertyname = 'sync-rev-source'
;

update CONTENTPROPERTIES
set stringval = 'synchrony-recovery'
where CONTENTID IN (SELECT c.contentid
  FROM CONTENT c
  JOIN BODYCONTENT bc
    ON c.contentid = bc.contentid
  JOIN SPACES s
    ON c.spaceid = s.spaceid
  WHERE c.content_status = 'draft'
    AND c.contenttype IN ('PAGE', 'BLOGPOST')
    AND bc.body LIKE '%ac:name="LaTeX inline"%'
)
   AND propertyname = 'sync-rev-source'
;

UPDATE bodycontent
SET body = replace(body,'ac:name="LaTeX block"','ac:name="latex-block"') 
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="LaTeX block"%'
)
;

UPDATE bodycontent
SET body = replace(body,'ac:name="LaTeX inline"','ac:name="latex-inline"') 
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="LaTeX inline"%'
)
;

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

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

Explanation of the above queries

Make Synchrony update its cache

If Collaborative Editing is enabled, change the properties of target shared drafts so that Synchrony updates its cache with the modified content.

LaTeX block macro

update CONTENTPROPERTIES
set stringval = 'synchrony-recovery'
where CONTENTID IN (SELECT c.contentid
  FROM CONTENT c
  JOIN BODYCONTENT bc
    ON c.contentid = bc.contentid
  JOIN SPACES s
    ON c.spaceid = s.spaceid
  WHERE c.content_status = 'draft'
    AND c.contenttype IN ('PAGE', 'BLOGPOST')
    AND bc.body LIKE '%ac:name="LaTeX block"%'
)
   AND propertyname = 'sync-rev-source'
;

LaTeX inline macro

update CONTENTPROPERTIES
set stringval = 'synchrony-recovery'
where CONTENTID IN (SELECT c.contentid
  FROM CONTENT c
  JOIN BODYCONTENT bc
    ON c.contentid = bc.contentid
  JOIN SPACES s
    ON c.spaceid = s.spaceid
  WHERE c.content_status = 'draft'
    AND c.contenttype IN ('PAGE', 'BLOGPOST')
    AND bc.body LIKE '%ac:name="LaTeX inline"%'
)
   AND propertyname = 'sync-rev-source'
;

Update the content of Pages, Blog posts, and Page Comments

Run the following SQL query to update the content of Pages, Blog posts, and Page Comments.

LaTeX block macro

UPDATE bodycontent
SET body = replace(body,'ac:name="LaTeX block"','ac:name="latex-block"') 
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="LaTeX block"%'
)
;

LaTeX inline macro

UPDATE bodycontent
SET body = replace(body,'ac:name="LaTeX inline"','ac:name="latex-inline"') 
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="LaTeX inline"%'
)
;

Update shared drafts

If Collaborative Editing is enabled, update the body of shared drafts.

LaTeX block macro

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

LaTeX inline macro

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

Start the Synchrony process

Start Confluence

Start Confluence following your standard procedure. If running Confluence Data Center, start Confluence on each node at a time.

If is enabled, we also need to touch the shared draft of target pages. The following SQL query provides information on shared drafts (pages and blog posts) using the old macro.

If Collaborative Editing is enabled and Synchrony is running on a , stop the Synchrony process on each node.

If Collaborative Editing is enabled and Synchrony is running on a , start the Synchrony process on each node following your standard procedure.

Atlassian's article
Atlassian's migration guideline
Collaborative editing
standalone cluster
standalone cluster