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

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Marketplace Apps

Tips on how to choose the best estimation method for your planning

Planning and grooming sessions all come with their own sets of rules. Team members meet to estimate stories or other work items, all according to an agreed-upon process. And with every session comes ...

76 views 0 11
Read article

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