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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.