Download PDF
Download page Migration between Servers.
Migration between Servers
Refer to this section of our documentation if you need to migrate your Confluence data from one Server/DC instance to another or merge Handy Macros data from a few instances.
Please note that when you perform Confluence XML export/import, the Handy Macros data don't migrate. Marketplace and user-installed apps are not included in the XML export. After importing your site export file into a new Confluence site, you'll need to re-install all apps that are not bundled with Confluence as the plugindata
table is not backed up in a manual backup. You can read more information on this at the Atlassian Support Documentation.
If you decide to manually transfer data with the help of XML export/import, please remember that the Handy Macros for Confluence app doesn't have any special tools or scripts for merging app data from a few instances. That means that you won't see the app data after this XML export/import.
There are two options possible as a workaround:
- Recreate all Handy Macros sets/statuses manually. We do realize that it can be time-consuming for large instances.
- Write custom SQL scripts for merging data. This option requires deep technical knowledge, though.
Write custom SQL scripts to merge Handy Macros data
Note that this procedure requires deep technical knowledge and work with the database. Don't use this method if you are not an experienced user. We suggest applying this method to your dev instance first. Although, our support tries to do their best to answer your questions and assist you with any requests, mind that this case is not covered by SLA.
Handy Macros database tables
You'll need the Handy Macros database tables for writing SQL scripts. Please see the list below.
AO_9437C1_HHEADER_SETTINGS
AO_9437C1_HTASKS_SETTINGS
AO_9437C1_OLD_NEW_SET_MAP
AO_9437C1_OLD_NEW_STATUS_MAP
AO_9437C1_REMINDER_MACRO
AO_9437C1_STATUS_ENTITY
AO_9437C1_STATUS_HISTORY
AO_9437C1_STATUS_MACRO_ENTITY
AO_9437C1_STATUS_MACRO_ID_MAP
AO_9437C1_STATUS_SET
Additionally, see down below the details for our app tables from the database.
AO_9437C1_HHEADER_SETTINGS -- Handy Heading macro.
Contains information about the current state of this feature for a Confluence user (active or not). The field "OWNER" can have the following values: global, space:{spaceName}, user:{userKey}.
AO_9437C1_HTASKS_SETTINGS -- Handy Tasks
Contains information about the current state of this feature for a Confluence user (active or not). The field "OWNER" can have the following values: global, space:{spaceName}, user:{userKey}.
AO_9437C1_OLD_NEW_SET_MAP -- Handy Status.
This table was needed for change the way of storing information about statuses.
AO_9437C1_OLD_NEW_STATUS_MAP -- Handy Status
This table was needed for change the way of storing information about statuses.
AO_9437C1_REMINDER_MACRO -- Handy Reminder.
Contains all information about configured macros on Confluence pages.
*The important fields for migration are:* PAGE_ID, AUTHOR(userKey), USERS (comma separated userKeys), GROUPS (comma separated Confluence group names)
AO_9437C1_STATUS_ENTITY -- Handy Status.
Contains all information about the status macro.
AO_9437C1_STATUS_HISTORY -- Handy Status.
Contains all information about history of changing status macros on Confluence pages.
AO_9437C1_STATUS_MACRO_ENTITY -- Handy Status.
Contains information about each status macro on Confluence pages.
AO_9437C1_STATUS_MACRO_ID_MAP -- Handy Status.
Contains additionall information about each status macro on Confluence pages.
AO_9437C1_STATUS_SET -- Handy Status.
Contains all information about status sets.
AO_9437C1_STATUSES_ENTITY -- Handy Status.
The table is no longer used. It has information about statuses and sets in old format.
AO_9437C1_WHAT_SNEW_ENTITY -- Handy Page Diff.
Contains information about Confluence page ID and version that an user has seen. (PAGE_ID, USER_KEY)
AO_9437C1_WNSETTINGS_ENTITY -- Handy Page Diff.
Contains information about the current state of this feature for a Confluence user (active or not). The field "OWNER" can have the following values: global, space:{spaceName}, user:{userKey}
Get the mapping for Confluence user keys and pages
Before merging the app tables, you need to get the mapping for Confluence user keys and pages. Let's name it user_mapping and page_id_mapping.
1) Copy the table AO_9437C1_STATUS_SET. You need to create a mapping for column ID. Let's name it set_id_mapping. Replace user keys for the column OWNER with the user_mapping. Replace IDs for the column PARENT with the set_id_mapping.
2) Copy the table AO_9437C1_STATUS_ENTITY. You need to create a mapping for column ID. Let's name it status_id_mapping. Replace IDs for the column STATUS_SET_ID with the set_id_mapping.
3) Copy the table AO_9437C1_STATUS_MACRO_ENTITY. You need to create a mapping for column ID. Let's name it macro_id_mapping. Replace IDs for the column PAGE_ID with the page_id_mapping. Replace IDs for the column CATEGORY with the set_id_mapping. Replace IDs for the column STATUS with the status_id_mapping.
4) Find all Confluence pages with Handy Status. Change the storage markup for these pages. The macro parameter <ac:parameter ac:name="id"> should be replaced with the macro_id_mapping
5) Copy the table AO_9437C1_STATUS_HISTORY. Replace IDs for the column MACRO_ID with the macro_id_mapping. Replace IDs for the column OLD_STATUS and NEW_STATUS with the status_id_mapping. Replace IDs for the column NEW_CATEGORY and OLD_CATEGORY with the set_id_mapping. Replace user keys for the column USER_KEY with the user_mapping.
6) Copy the table AO_9437C1_STATUS_MACRO_ID_MAP. Replace IDs for the column OLD_ID and CURRENT_ID with the macro_id_mapping. Replace IDs for the column PAGE_ID with the page_id_mapping.
7) Update all DB tables and sequences in your instance on the target host. You need to run 2 queries for each DB table and sequence as follows. The first one:SELECT MAX(public."AO_9437C1_***"."ID") FROM public."AO_9437C1_***";
In the second one, you need to replace max with the result from the first query.ALTER SEQUENCE "AO_9437C1_***_ID_seq" RESTART WITH max + 1000;
Follow these steps to merge Handy Status data from different instances into one. Handy Reminder Data can also be merged similarly.
Examples of the DB data mapping
Down below you can see the examples of the DB data mapping. They illustrate how you can create mappings in case of merging several DB with Handy Macros data. Please remember that this is an example and you will have your own data instead.
Example of set_id_mapping
Example of status_id_mapping
Example of macro_id_mapping
Example of user_mapping
Example of page_id_mapping
FAQ
- How can I move the table data from the old site to the new site?
You need to export all records from the DB of the old site, and then import them to the DB of the new site. This can be done by any means. The way you decide to perform this action is up to you. As an option, SQL scripts can work for this purpose. - What should I change in the old table exported data to import this data to our new site database for the app tables?
You need to replace all unique information about Confluence Page IDs and Confluence User Keys. More details are described in our documentation on this page. - What steps are required to import from old database tables to the new database tables?
We need to draw your attention to the fact that we don’t have a step-by-step migration plan or instructions for migration between client servers. The users' environment and technical processes are unique for each particular case.
Can you ensure successful data migration between servers in my environment?
Unfortunately, we can’t ensure a positive result on your side. Note that migration between servers requires deep technical knowledge and work with the database. Don't use this method if you are not an experienced user. We suggest applying this method to your dev instance first.
Note that the Handy Macros data migration between servers is not included in the default app functionality. We can't ensure the success of this server-to-server migration and don't provide support services for this type of data migration. Although, our support tries to do their best to answer your questions and assist you with any requests, mind that this case is not covered by SLA.