Could not find data for attachment after upgrading Confluence server

Jasmina Cupac November 27, 2018

Vi upgraded from 4.3.6 via 5.10.8 to 6.12.1 and also upgraded to database ver 12.2

After upgrading some of the attachments are missing and some of them are ok.

Downloaded the script FindMissingAttachments.py and created a new Attachments.txt

 

Output from running the script:

python FindMissingAttachments.py
Confluence Attachment Fixing Tool v1.6.1 - Dave Norton [Atlassian]
Please ensure Confluence has been shut down, and you have a full backup of the home directory

Where is your Confluence attachments directory: /u01/confluence/data/attachments
What is your column seperator? Type t to use a tab character: t
Setting your column seperator to a tab character
Cleaning up the Byte Order Marker in Attachments.txt if any
Generating paths based on IDs in Attachments.txt
Writing paths to check to PathsToCheck.txt

Performing a check on the files listed in PathsToCheck.txt
There are 115 missing files
Writing the missing file paths to MissingFiles.txt

This tool can attempt to find and recover the missing files. Would you like to do this now? (y/n): y
Building a hash of your attachments directory. This will take a while - stand by!
Hash table complete - 590 paths in total. Searching for lost attachments....

Found 0 lost attachments - saved them to FoundFiles.txt. Attempting recovery...
The process has completed. 0 attachments of 0 have been successfully recovered.

 

zero attachments were restored and we wonder if the attachments are lost for ever or if its possible to get them back.

 

1 answer

0 votes
Daniel Eads
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 6, 2018

Hi Jasmina,

Does the MissingFiles.txt file contain the filenames of the attachments which seem to be missing from Confluence?

My suggestion would be to check whatever file backup mechanism you have on your server to see if the files exist in the filesystem prior to the upgrade. The attachments are stored in Confluence's home directory by default. However, the version you migrated from did allow the storage of attachments directly in the database. If this was the case, you'll need to restore a previous copy of your Confluence database on a different server to migrate the attachments out.

This document describes the structure of the attachments directory on disk. Based on the pages the attachments are missing from, you can traverse a backup of Confluence's home directory to find files. It might also be worth looking for the files in the "live" home directory to ensure something strange like a rename on-disk did not occur.

Unfortunately if you did not have some sort of file backup mechanism in place, I'm not sure there's much to be done. Since the filenames should be in the MissingFiles.txt document, searching for those filenames on your current filesystem or in any backups you had available is the fastest way to see if they are still available somewhere.

Best,
Daniel

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events