Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-78987

XML site backup fails because temp files are removed in the middle of the process

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Low Low
    • None
    • 6.0.0
    • Site - Backup / Import
    • None

      Issue Summary

      Confluence has a scheduled job that removes files in the temp folder when they become older than 1 hour.

      XML site backup creates a folder (xmlexport-*) in the temp directory at the beginning. Then, during the backup process, it creates a set of files inside that folder.

      The cleaner job checks modification dates for the top-level files and folders only. As a result, it would remove the whole folder created by the backup process because the modification date for the backup folder remains the same.

      Steps to Reproduce

      1. Install Confluence
      2. Start the backup of the large instance
      3. Check that the "xmlexport-" folder is created inside the temp folder. "xmlexport-" has to have exportDescriptor.properties inside
      4. Wait for a few hours (but the backup process should be in the progress state at this moment)

      Expected Results

      xmlexport-* folder and exportDescriptor.properties still exist.

      Actual Results

      Either xmlexport-* or exportDescriptor.properties are removed.

      Workaround

      Before running the large XML site backup, add a cron task that updates the modification dates for any backup temp folders every 30 min like this (Confluence process and this crontab have to be run under the same user):

      */30 * * * * touch /<path-to-your-confluence-home-folder>/temp/xmlexport-* > /dev/null 2>&1 

      It will prevent the removal of temp backup folders.

      Important: this cron job task has to be removed after finishing the XML site backup. Otherwise, Confluence will never remove temp backup folders.

              Unassigned Unassigned
              glipatov George Lipatov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: