Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Delete attachment references from Database

matt
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 21, 2023

We copy our Production Jira and Confluence down to a Development environment. We do not copy attachments because we do not need them there.

I am looking for a database query to delete all the attachment references in the database, to avoid errors in logs when re-indexing both Jira and Confluence because it cannot find the attachment.

1 answer

1 accepted

0 votes
Answer accepted
Florian Bonniec
Community Champion
August 21, 2023

Hi @matt 

 

For JIRA it's in this table and should be returned by the query below.

select fa.id, fa.filename, ji.issuenum from fileattachment fa join jiraissue ji on ji.id = fa.issueid join project p on p.id = ji.project where p.pkey = 'PRG';

Locate Jira server file attachments in the filesystem | Jira | Atlassian Documentation

For Confluence this KB should help you.

How do I list all attachments in Confluence with their location and file sizes? | Confluence | Atlassian Documentation

Regards,

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
9.10.0
TAGS
atlassian, confluence, loom, atlassian intelligence, ai notes, ai-powered meeting notes, atlassian community events, ace, confluence ai, loom ai integration, ai note-taking, atlassian ai features, team '25, atlassian live learning, confluence automation

Unlock AI-powered meeting notes: Join our live learning session! 📹

Did you catch the news at Team ‘25? With Loom, Confluence, Atlassian Intelligence, & even Jira 👀, you won’t have to worry about taking meeting notes again… unless you want to. Join us to explore the beta & discover a new way to boost meeting productivity.

Register today!
AUG Leaders

Atlassian Community Events