How to disable the content re-migration job on startup

Still need help?

The Atlassian Community is here for you.

Ask the community

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:

  1. Open CONF_INSTALL_FOLDER/bin/setenv.sh (or setenv.bat under Windows)
  2. Locate "CATALINA_OPTS" and add the following line to the file:

    CATALINA_OPTS="-Dconfluence.startup.remigration.disable=true $ {CATALINA_OPTS}"
    
  3. Save the file and restart Tomcat



Last modified on Oct 31, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.