Scheduled backup fails with "java.io.IOException: .. not a file"

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Low
    • None
    • Affects Version/s: 12.1.12
    • Component/s: Import / Export
    • None
    • Severity 2 - Major

      Issue Summary

      When a scheduled backup's file name matches an existing file in the backup directory, and Export artifacts is enabled, the backup fails if any stored artifact has a file name ending in .zip or .jar. Bamboo writes into the existing backup file instead of replacing it, and the .zip artifact stored by the previous backup cannot be overwritten.

      Reusing a backup file name without any .zip artifacts does not cause the failure.

      This is reproducible on Data Center:

      Steps to Reproduce

      1. Create a plan with a Script task that produces a zip file.
      2. Add an artifact definition with copy pattern .zip and *Shared checked. Run the plan once.
      3. Go to Administration › Scheduled backups and configure:
        • Backup file date pattern: yyyy_MM_dd (default)
        • Export artifacts: enabled
      4. Wait for the first scheduled backup. It succeeds and creates bamboo_backup_<date>.zip.
      5. Wait for the next scheduled backup on the same day.

      Expected Results

      The second backup completes successfully, either by replacing the existing backup file or by creating a new file.

      Actual Results

      The second backup fails. The following is logged in atlassian-bamboo.log:

      INFO  [scheduler_Worker-5] [XmlMigrator] Zipping artifacts dir:<bamboo-shared-home>/backups/bamboo_backup_2026_10_22.zip/artifacts
      ERROR [scheduler_Worker-5] [ScheduledBackupJob] java.io.IOException: <bamboo-shared-home>/backups/bamboo_backup_2026_10_22.zip/artifacts/plan-655361/shared/build-00004/cluster1/test-artifact.zip (not a file)
      java.io.IOException: <bamboo-shared-home>/backups/bamboo_backup_2026_10_22.zip/artifacts/plan-655361/shared/build-00004/cluster1/test-artifact.zip (not a file)
              at com.atlassian.bamboo.configuration.ScheduledBackupJob.executeBody(ScheduledBackupJob.java:69)
      

      This also happens with the default yyyy_MM_dd pattern whenever backups run more than once per day, and with patterns that repeat (e.g. E, MM_dd).

      Workaround

      Use any one of the following:

      • Set the Backup file date pattern to a value that is unique for every run, e.g. yyyy_MM_dd_HHmm.
      • Move existing backup files out of the backup directory before the next scheduled backup.
      • Disable Export artifacts in Scheduled backups and back up <bamboo-shared-home>/artifacts separately.

              Assignee:
              Mateusz Szmal
              Reporter:
              Jyothi Charupalli
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: