Filesystem store

Last modified by Thomas Mortagne on 2024/06/24

By default in XWiki the content of attachments and deleted attachments and documents are stored in what we call the "filesystem store". Its default location is <permanentdir>/store/file.

It's a simple file based storage in which documents and attachments references are (md5) hashed, to avoid problems with various limited (in terms of encoding and path size) file systems. The filesystem store implements a two stage commit mechanism to maintain integrity even if the database fails to commit the attachment meta-data for example.

For example the attachment XWikiLogo.png in document Sandbox.WebHome is stored in the following location: /1/0/5d42329a923e687f5dff4887d80098/attachments/9/2/0bc685fa0da28168319c0126def81b.

And where is my entity located ?

Attachments and deleted attachments

By default, inside the attachment folder, you will find both the current version of the attachment and its history. The file name is always f, it's then optionally followed by the version (when it's a piece of the history) and the original file extension.

For example for an image of type png:

  • f.png
  • fv1.1.png
  • fv2.1.png

XWiki 16.4.0+

Most of the time, instead of the current version of the attachment, a "link" is created. It's a file which name is suffixed with .lnk which contains the relative path it's representing. In standard condition, it always points to the latest version of the attachment.

For example for an image of type png:

  • f.png.lnk contains the string fv2.1.png
  • fv1.1.png
  • fv2.1.png

The different between attachments and deleted attachment is the location of that folder inside the document folder:

  • an attachment is located in /attachments/<hash/based/on the attachment name>/
  • a deleted is located in /deleted-attachments/<hash/based/on the attachment name>/<index of the deleted attachment>/

Deleted documents


Get Connected