Excerpt | ||
---|---|---|
| ||
Find the filesystem path for Confluence attachments. |
...
Code Block |
---|
cat /tmp/confattachments.sql | psql confluence -tAq | while IFS='|' read path filesize pageurl atturl ; do test -f /var/atlassian/application-data/confluence/current/"$path" || echo "Missing attachment $path on page $pageurl"; done |
How does it work?
The official documentation on Confluence's attachment filesystem structure is Hierarchical File System Attachment Storage. At a high level, an attachment's path consists of:
...
..and that forms the core of the final SQL query presented at the beginning.
Note |
---|
JIRA has its own elaborate attachment structure nowadays too - see http://blog.valiantys.com/en/jira-en/million-jira-issues for details. |