Wiki source code of Permanent Directory
Last modified by Eleni Cojocariu on 2026/09/11 18:08
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | The permanent directory is where XWiki keeps everything that has to survive a restart and an upgrade: attachments and deleted pages, installed extensions, search indexes, queued mails, job statuses, and the caches that are expensive to rebuild. [[Sub-Directories in the Permanent Directory>>doc:documentation.xs.admin.configuration.directories.permanent-directory.sub-directories.WebHome]] describes what each of them holds. | ||
| 2 | |||
| 3 | == How XWiki picks it == | ||
| 4 | |||
| 5 | XWiki takes the first of these it can write to: | ||
| 6 | |||
| 7 | 1. the ##xwiki.data.dir## Java system property; | ||
| 8 | 1. the ##environment.permanentDirectory## property of ##xwiki/WEB-INF/xwiki.properties##; | ||
| 9 | 1. the [[temporary directory>>doc:documentation.xs.admin.configuration.directories.temporary-directory.WebHome]]. | ||
| 10 | |||
| 11 | The third one is a fallback, not a setting. An instance that reaches it logs a warning naming ##environment.permanentDirectory##, and it then stores data that must not be lost in a directory XWiki empties at every startup. | ||
| 12 | |||
| 13 | [[Configure the Permanent Directory>>doc:documentation.xs.admin.configuration.directories.permanent-directory.configure.WebHome]] sets one of the first two, and [[Find the Current Permanent Directory>>doc:documentation.xs.admin.configuration.directories.permanent-directory.find.WebHome]] shows which one an instance ended up with. |