Missing Attachments Script only restored image files

Jens Iwanenko June 26, 2018

Hi.

So a user ran into a missing attachment yesterday. After some ado and babysitting the IT department, I was able to confirm that the files are still on disk following this KB entry:

https://confluence.atlassian.com/confkb/how-to-resolve-missing-attachments-in-confluence-201761.html

I had my supervisor run the script last night and he was able to restore a couple dozen attachments. I can also confirm that on one page where an attachment was missing it is back. But the script seems to only have restored image files. My user tried to retrieve an Excel sheet and while testing adjacent pages, I can also confirm that a couple of Word docs are still missing.

Any suggestions on how to retrieve other attachments? Are attachments other than images linked differently in the database?

-- Jens

1 answer

1 accepted

0 votes
Answer accepted
AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 27, 2018

Hi Jens,

Images and other files are linked the same way in the database; the Python script on How to resolve missing attachments in Confluence works on both images and other attachments.

Please identify an attachment still missing since the script was run, and make sure it was on the disk to start with, also make sure it made it into the tab separated file that the SQL queries generated. That will help us isolate the issue.

Thanks,

Ann

Jens Iwanenko June 28, 2018

Hi Ann,

the file that's still missing was the one I used to identify if a restore was possible. I didn't look *into* the folder if there's a file in it, but the folder with the respective ID was definitely there. I'll ask IT if they can look it up again and see if it's still there after the script was run.

I don't have database access on our Confluence instances, but I will try and have the list sent to me so I can double check.

Jens Iwanenko June 28, 2018

I just found the Pages can not be copied or images not loaded on a page article in the Support Tools after reproducing the error. I know that large portions of our structure have recently been moved. From my understanding the solution to this problem is not covered by the python script, but I'm not a python pro.

Is my assumption correct? And if so: is there another script that can restore files that have been moved out of the way? We seem to have quite a couple of pages that are affected, another user just reported another case today.

-- Jens

Like Sloan N_ B_ likes this
Jens Iwanenko June 29, 2018

I think the support article fixed our problem. I ran a power shell search on the attachments directory for "*moved_out_of_the_way" to get an idea of the scope and only got 8 results. There weren't many subpages to these 8 results so I was able to fix it by hand real quick.

Have a nice weekend everybody! (hope you're not reading this on a monday) :)

Like Sloan N_ B_ likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events