Hi,
I have a client that dropped all objects of a certain type in assets.
We did a restore of the database on a staging environment, reinstalled Jira and I was able to export the data to reimport it in production.
Unfortunately, the attachements did not follow.
Is there any way I can achieve this ?
Thanks.
You're facing a common challenge with Jira restores – attachments often don't get included when you restore just the database. Here's a breakdown of how to handle this:
1. If You Have the Original jira-home
Directory:
This is the best-case scenario. If you have a backup of the jira-home
directory from before the objects were deleted, you can restore the attachments directly.
data/attachments
directory within your staging instance's jira-home
with the data/attachments
directory from your backup.2. If You Only Have the Database Backup:
This is more complex. The database only stores metadata about the attachments (filename, size, etc.), not the files themselves. You'll need to find the actual attachment files.
Possible Locations:
Backup of the jira-home
directory (even an older one): Even if it's not from right before the deletion, it might contain some of the attachments.
File system backups: Check if your server backups include the jira-home
directory.
Network shares: If Jira was configured to store attachments on a network share, check there.
Procedure (if you locate the files):
data/attachments
directory. The subdirectories within attachments
are typically hexadecimal hashes. You might need to examine the database to figure out the correct paths (the file_attachment
table might have clues).data/attachments
directory of your staging Jira instance.3. If You Have Neither jira-home
nor the Files:
This is the worst-case scenario. Recovery is very difficult, and you might need to consider data recovery services.
Important Considerations:
jira-home
).jira-home
directory (e.g., on a network share or cloud storage) can simplify recovery in some cases.If you have a partial jira-home
backup or file system backups, you might be able to recover some of the attachments. The key is to locate the actual attachment files and place them in the correct location within the data/attachments
directory. If you're unsure, consult with an Atlassian expert.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.