Attachments cannot be migrated during snapshot deployment in CMJ (Data Center)

Attachments cannot be migrated during snapshot deployment in CMJ (Data Center)

Problem

The snapshot deployment completes without explicitly reporting any errors in the CMJ or Jira logs. However, the attachments are not migrated, despite a valid attachments folder being present on the server and selected during deployment.

Below is an example of the attachment path used:

/var/nfs_sharedhome/import/attachments/

It was confirmed that the directory exists with content and no error messages were visible in the deployment UI or logs.

Solution

When deploying snapshots in CMJ for Jira Data Center, attachment migration can silently fail if the attachment path or permissions are not correctly set. The following conditions must be verified:

  1. Permission Validation
    Ensure the Jira application user (typically jira) has full read access to the specified directory and its subdirectories. If running on a Data Center cluster, verify this for each node.

  2. Correct Directory Structure
    The folder structure under the specified path must follow this exact layout:

    /attachments/PROJECTKEY/ISSUEKEY/attachments/

    Example:

    /var/nfs_sharedhome/import/attachments/PROJ-123/ISSUE-456/attachments/

  3. NFS (Network File System) Storage Considerations
    The path provided was an NFS mount. If this mount is not properly synchronized or permissioned across all nodes, CMJ may skip the attachment import without generating an error. Consider the following:

    • Validate mount availability on all nodes.

    • Confirm consistent UID (User ID) /GID (Group ID) ownership across nodes.

    • Ensure there are no stale mounts or permission discrepancies.

  4. Recommended Test
    To isolate the issue, perform a test by moving a subset of attachments to a local directory (e.g., /tmp/cmj/attachments) and re-run the snapshot deployment while pointing to this path. This helps confirm whether the issue is related to mount accessibility or folder structure.

  5. Deployment Outcome
    In the resolved case, the snapshot deployment will be successfully completed with attachments after taking the following actions:

    • Moved the attachments folder from the NFS-mounted path to a local directory (/tmp/cmj/attachments) on the Jira application server.

    • Ensured the attachment directory followed the required structure:

      /tmp/cmj/attachments/PROJECTKEY/ISSUEKEY/attachments/

    • Re-ran the deployment, specifying the new local path in the CMJ deployment configuration.

 Related articles