How to restore lost attachments in CMJ Data Center
In Configuration Manager for Jira (CMJ) versions 6.15.0, 6.15.1, and 6.15.2, an identified bug may result in lost attachments when exporting projects with issues and attachments. If you are impacted by this bug, please review the two approaches below to restore any lost attachments.
Both approaches require that you still have access to the original snapshot. To restore the attachments from the exported snapshot, use the approach that better suits your needs and instance setup.
Prior to proceeding with either approach below to restore lost attachments, we strongly advise you to upgrade CMJ to the most recent marketplace version across all your Jira instances.
The latest version includes a fix to the bug and will prevent any loss of attachments in future exports. Please be aware that solely upgrading CMJ will not recover the lost attachments.
Approach 1: Restoring attachments by redeploying the snapshot on the affected Jira instance
To restore lost attachments in Jira, follow these steps:
Prepare your Jira instance and create a backup:
Ensure you upgrade to the latest CMJ version from the marketplace to avoid issues.
Since you are working on an active instance, create a backup of the project before starting.
Ensure you are working on the same Jira instance where the data loss occurred. This should be the same instance where attachments were lost during export with the affected CMJ version (6.15.0, 6.15.1, or 6.15.2).
Delete Affected Issues
Before proceeding, delete the issues affected by the data loss from the project.
Deploy the Snapshot
Deploy the snapshot in the same Jira instance.
When deploying, select Merge Project and choose the affected project.
Follow this guide for merging: Merge Project with Issues Snapshot.
The deleted issues will be recreated with the correct attachments since they are in the snapshot.
Approach 2: Restoring lost attachments using a temporary Jira instance and a custom version of CMJ
To restore lost attachments in Jira, follow these steps:
Set up a temporary Jira instance
Create a new temporary Jira instance with the same version as your Production Jira instance.
Install the following CMJ custom version on this temporary Jira instance (do NOT install this version on Production):
Follow this guide to install an app from a file: Installing Marketplace Apps.
Ensure your temporary Jira has the default setup for storing attachments locally.
The default path for storing attachments locally is JIRA_HOME/data/attachments
.
License the CMJ custom version
License the CMJ custom version using a trial or development license.
Deploy Production snapshots
Deploy all of your Production snapshots that contain the lost attachments.
Deploy in “New Project" mode and do not change project keys or names. Follow this guide: New Project Mode.
Verify the attachment folder structure
After deployment, the attachment folder structure should be restored as it was in your Production instance.
Attachments won't be accessible via the Jira UI in the temporary Jira instance, which is expected. Check out the image on the right for an example of the folder structure, which can be viewed at the path:
JIRA_HOME/data/attachments
Backup production attachments
Create a backup of the attachments in the production instance before copying attachments from the temporary Jira instance.
Copy and validate a few attachment files to the Production instance
Start by copying a single project/issue file from the attachments location file structure of the temporary Jira instance to the corresponding file structure on the Production instance where the attachments are located.
Validate via the Jira UI that the copied attachments are accessible and working as expected in the Production instance.
Copy files one by one, by issue folder, or by project folder. Ensure contents are copied to the corresponding project or issue folder in the Production instance.
Use tools like
rsync
to move files without removing any existing files from the Production instance.
Copy remaining files
Once a few attachments or issues are validated, proceed with copying all remaining files using
rsync
or a similar tool.Ensure no folders and attachments files are removed from the Production instance during the copying process.
If you need further assistance, please reach out to us at our Support Portal.