I am asking this question as I have not been able to find a sufficient answer online. We are running Jira v6.4.1 and are migrating to newer version on cloud. What is the best way to export comments and attachments, if possible? Comments are priority. Is there a plugin or something? As it stands, when I export to Excel and click All fields, there is no comment filed in file.
1 Answers
Well, the easy answer is you can't export the comments from the application.
However, you can write a script that:
- Gets the comments from the current (older) Jira (via REST API or DB)
- Puts the comments to another DB or holds it as JSON.
Then, after the migration;
- Gets the comments from the DB or the JSON
- Inserts them to the new system.
By the way, Jira Cloud instances allows a user to insert a comment on behalf of another user (JRACLOUD-35124); however, if you fail on that operation, you always can use ScriptRunner for Jira plugin for inserting comments.
And for the attachments;
Jira holds the attachments on database (attachments
table) and the attachments folder in Jira data directory (/application-data/jira/attachments). (Attachment folder can be changed; so if it is on a custom location; you can find the attachment location from Jira system settings page.)
SO, you can follow a strategy like that:
- If the data in your database will not be changed:
You can backup the attachments folder before the migration; and after the migration you can just copy it to the same directory.
- If the data in your database will be changed:
(BE CAREFUL) Get the attachments table from the database and attachments folder from the server before the migration and carefully insert the attachment data to the new database, and place the attachments folder to the server after the migration.
Or,
You can always write a script for that operation too. Just save the attachments and write a script that:
For each file in attachments folder
a. Gets the issue key from the folder. b. Gets the attached file. c. Attach the file to the issue in migrated Jira.
By the way, always dump/backup your database before these operations and before the migration.

- 1,477
- 2
- 14
- 30
-
Thank you for this comprehensive answer. Will see what i do in the end. – Dain L Jan 17 '22 at 13:57