How to disable the content re-migration job on startup
Purpose
Because of a fix in Confluence 5.7.4 ( CONF-35004 ), each restart following a plugin update/upgrade/install triggers a job to re-migrate "unmigrated" pages, which includes pages that have unknown macros. These pages will get re-migrated again if any plugins are updated/enabled/re-enabled and followed by a restart. This creates additional entries in the change histories of the "re-migrated" pages, and can have a possible performance impact since attachments on such re-migrated pages are then re-indexed.
Solution
For Confluence 5.10.7 and below
You can disable the remigration job via SQL.
Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.
Before every Confluence startup, run the following query to determine whether the content remigration job will be triggered:
SELECT * FROM BANDANA WHERE BANDANAKEY = 'migration.required';
If the "bandanavalue" column shows "true", then update this to "false" to prevent the startup from starting the re-migration job.
UPDATE BANDANA SET BANDANAVALUE = '<boolean>false</boolean>' WHERE BANDANAKEY = 'migration.required';
This value should be checked on every restart because the aforementioned plugin operations may set the "migration.required" value back to "true".
For Confluence 5.10.8 and above
A system variable was added to enable/disable remigration behavior during startup. To use this feature:
- Open CONF_INSTALL_FOLDER/bin/setenv.sh (or setenv.bat under Windows)
Locate "CATALINA_OPTS" and add the following line to the file:
CATALINA_OPTS="-Dconfluence.startup.remigration.disable=true $ {CATALINA_OPTS}"
- Save the file and restart Tomcat