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: https://confluence.atlassian.com/display/CONFKB/Resolve+Missing+Attachments+in+Confluence 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

/opt/confluence-data

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

./attachments/ver003/32670278/33947681

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

root@arthur 33947681 # ls

1

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

Accepted Answer
0 votes

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 Tuesday in Featured Groups

Tuesday tips & tricks: What is the Atlassian Community?

It's officially Tuesday, which means it's officially time for another tip to help you better navigate this space we call the Atlassian Community. 😄 I got a great question from community member, Sa...

78 views 3 6
View post

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