How to export Confluence Questions data
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
This guide is for informational purposes and is not eligible for support as part of the Atlassian Support Offerings. If you have any questions about the information on this page, please reach out to our Atlassian Community for help.
Summary
Currently, the only way to migrate Confluence Questions data between two Confluence instances is with a full Site Backup and Restore. Confluence Questions data is not included in Space Export.
There is an Enhancement Request to introduce this feature: CONFSERVER-51723 - Exporter / Importer for Confluence Questions.
In certain situations, there might be a need to export or preserve Confluence Questions data, this KB offers a few options.
Solution
Rest API
REST API functionality is only from version 2.3.0 and above. If you are on an older version you will need to upgrade first.
Note: The Confluence Questions that comes withExport all questions refer here
GET http://<confluence>/rest/questions/1.0/question?limit=700
Export all answers refer here.
This is per answerID
GET http://<confluence>/rest/questions/1.0/answer/{answerId}
Database
This process requires the use of direct database manipulation and is not part of Confluence's intended functionality. As such, this process is not covered under the Atlassian Support Offerings and the information on this page is provided as-is. It should be thoroughly tested in a development or staging environment before implementing any changes in your production instance.
Another option to retrieve this data would be to use SQL to query this information stored in the Confluence database.
The Q&A stores data in following tables:
- AO_B1DBB9_ACCEPTANCE
- AO_B1DBB9_BOUNTY
- AO_B1DBB9_VOTE
- CONTENT
- BODYCONTENT
All questions can be found using this query:
SELECT * FROM %YOURCONFLUENCEDBNAME%.CONTENT
where PLUGINKEY in
('com.atlassian.confluence.plugins.confluence-questions:question');
All answers can be fetched using this query:
SELECT * FROM %YOURCONFLUENCEDBNAME%.BODYCONTENT b
where b.CONTENTID in (
SELECT a.CONTENTID FROM %YOURCONFLUENCEDBNAME%.CONTENT a
where a.PLUGINKEY in
('com.atlassian.confluence.plugins.confluence-questions:answer'));
You can also export all information into CSV by following this KB:
How to export Confluence Questions Content to CSV Through the Database