After upgrade to Confluence 4.3.3 attachments are missing

We completed the upgrade to 4.3.3 but most of our attachments and imbedded images are now appearing as broken links. I followed the instructions on the Atlassian support site: and I have attached the output to this support request.

The attachments are still in subdirectories in the /opt/confluence-data/attachments/ver003 directory, but not in the subdirectories that the script seems to be looking for them. As an example - the report lists the following attachment as missing:

Missing attachment: /opt/confluence-data/attachments/ver003/179/156/12156929/28/170/32670278/33947681/1, filename: CREATE_INSERT_datawarehouse.rpt_JCPL_personIDs.sql, filetype: null

Looking in the /opt/confluence-data/attachments/ver003 directory I find the 33947681 directory:

root@arthur confluence-data # pwd


root@arthur confluence-data # find ./ -type d -name 33947681


root@arthur confluence-data # cd ./attachments/ver003/32670278/33947681

root@arthur 33947681 # ls


I have verified that the path currently in place is the same path that works in the previous version of Confluence.

I need some help understanding how we can remap the attachments and images by either updating the metadata or creating the new subdirectories currently identified by the Find Missing Attachments Report.

2 answers

1 accepted

0 votes
Accepted answer

I had to manually move all of the files from their original location to the location identified by the 'find lost attachments' script.

At a very high level - I took the output of the 'find lost attachments' jsp and put it in a file named 'wiki_missing_files.txt'

Then I stripped out the new filenames with: perl -pi -e 's/Missing attachment: (.*), filename:.*/$1/' wiki_missing_files.txt

Then I created all my directories and copied all the files from the old location (derived from the new location) to the new location:

for i in $(cat wiki_missing_files.txt); do NEWDIR=${i%/*}; OLDPATH1=$(basename $NEWDIR); OLDPATH2=$(basename $(dirname $NEWDIR)); mkdir -p $NEWDIR; cp /opt/confluence-data/attachments/ver003/$OLDPATH2/$OLDPATH1/* $NEWDIR; done

Following all of this I ran the 'find missing attachments' script again and had no missing files.

Hi, have you tried to re-index Confluence? It was stated in your post. This might solve it. Give it a try first.

I have rebuilt the indexes (and just did so again); the paths to the attachments are still inaccurate.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted 5 hours ago in Agile

What is Scrum? A good, bad, and ugly answer.

In a world of dark-scrum, faux-scrum, and scrum-butt, the question still remains: What is scrum and how do you do it “right?” That’s the question we set out to answer. I'm Max, I've been teaching c...

44 views 0 1
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you