I am attempting to repair a Confluence Data Center space, using the Fix Missing Attachments Script. Our attachments are stored in a shared volume with the path: /data/confluence/sharedhome/attachments
When I run the script (Confluence is down), I get the error message:
[Error] - The directory "/data/confluence/sharedhome/attachments/ver003" is not a valid attachments directory
When I run the script on this path: /data/confluence/sharedhome/attachments I get this error.
Cleaning up the Byte Order Marker in Attachments.txt if any
Traceback (most recent call last):
File "FixMissingAttachments.py", line 430, in <module>
os.path.join(attachmentPath.strip(), 'ver003', mod(space), mod(page), content.strip(), version.strip()))
File "FixMissingAttachments.py", line 310, in mod
the_id = int(the_id)
ValueError: invalid literal for int() with base 10: '"6717442"'
I'm running the script as the user that starts the Confluence service.
Hi Ben,
The issue might be seen because the script expects the integer number in Attachments.txt and finds the numbers between single or double quote. So remove the quotes and try out again.
Records like this
"7536641","7405628","7405696",1
"1212421","7405603","7405709",1
"1212421","3604555","3604556",1
should be changed to
7536641,7405628,7405696,1
1212421,7405603,7405709,1
Let us know how it goes.
Regards
Nirmal Shah
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.