mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 20:49:01 +01:00
docs(user): improve fine-grained directory path documentation
This commit is contained in:
parent
bcffa77c90
commit
99f43e2280
@ -1,14 +1,14 @@
|
||||
<p>Data directory contains:</p>
|
||||
<ul>
|
||||
<li><code>document.db</code> - <a href="#root/_help_wX4HbRucYSDD">database</a>
|
||||
<li data-list-item-id="e7e3f98ffede29728ab8d5dfd25d8f8a7"><code>document.db</code> - <a href="#root/_help_wX4HbRucYSDD">database</a>
|
||||
</li>
|
||||
<li><code>config.ini</code> - instance level settings like port on which the
|
||||
<li data-list-item-id="eb78343d193877e82846fc94581037d9d"><code>config.ini</code> - instance level settings like port on which the
|
||||
Trilium application runs</li>
|
||||
<li><code>backup</code> - contains automatically <a href="#root/_help_ODY7qQn5m2FT">backup</a> of
|
||||
<li data-list-item-id="e73061b739634b18f45d9d842f82c0102"><code>backup</code> - contains automatically <a href="#root/_help_ODY7qQn5m2FT">backup</a> of
|
||||
documents</li>
|
||||
<li><code>log</code> - contains application log files</li>
|
||||
<li data-list-item-id="e607bdb8fd7ebaf453623ba05ccd06625"><code>log</code> - contains application log files</li>
|
||||
</ul>
|
||||
<h2>Location</h2>
|
||||
<h2>Location of the data directory</h2>
|
||||
<p>Easy way how to find out which data directory Trilium uses is to look
|
||||
at the "About Trilium Notes" dialog (from "Menu" in upper left corner):</p>
|
||||
<p>
|
||||
@ -18,11 +18,14 @@
|
||||
<p>Data directory is normally named <code>trilium-data</code> and it is stored
|
||||
in:</p>
|
||||
<ul>
|
||||
<li><code>/home/[user]/.local/share</code> for Linux</li>
|
||||
<li><code>C:\Users\[user]\AppData\Roaming</code> for Windows Vista and up</li>
|
||||
<li><code>/Users/[user]/Library/Application Support</code> for Mac OS</li>
|
||||
<li>user's home is a fallback if some of the paths above don't exist</li>
|
||||
<li>user's home is also a default setup for [[docker|Docker server installation]]</li>
|
||||
<li data-list-item-id="eccf81a2f4d24647a0c925ee0fdf7d85b"><code>/home/[user]/.local/share</code> for Linux</li>
|
||||
<li data-list-item-id="e0a4105e12f1eac1c654aa2497809c595"><code>C:\Users\[user]\AppData\Roaming</code> for Windows Vista and up</li>
|
||||
<li
|
||||
data-list-item-id="efa7faedd2f685103226ebc20ed8a7080"><code>/Users/[user]/Library/Application Support</code> for Mac OS</li>
|
||||
<li
|
||||
data-list-item-id="ea241b8e58d6fcf97d17f4eebb75e3262">user's home is a fallback if some of the paths above don't exist</li>
|
||||
<li
|
||||
data-list-item-id="ee543cb6057f45cc7dadf7a28d67588f3">user's home is also a default setup for [[docker|Docker server installation]]</li>
|
||||
</ul>
|
||||
<p>If you want to back up your Trilium data, just backup this single directory
|
||||
- it contains everything you need.</p>
|
||||
@ -62,20 +65,72 @@
|
||||
<p>To do this in unix based systems simply run trilium like this:</p><pre><code class="language-text-x-trilium-auto">TRILIUM_DATA_DIR=/home/myuser/data/my-trilium-data trilium</code></pre>
|
||||
<p>You can then save the above command as a shell script on your path for
|
||||
convenience.</p>
|
||||
<h3>Fine-grained directory/path location</h3>
|
||||
<p>It's possible to configure e.g. backup and log directories separately,
|
||||
with following environment variables:</p>
|
||||
<ul>
|
||||
<li><code>TRILIUM_DOCUMENT_PATH</code>
|
||||
</li>
|
||||
<li><code>TRILIUM_BACKUP_DIR</code>
|
||||
</li>
|
||||
<li><code>TRILIUM_LOG_DIR</code>
|
||||
</li>
|
||||
<li><code>TRILIUM_ANONYMIZED_DB_DIR</code>
|
||||
</li>
|
||||
<li><code>TRILIUM_CONFIG_INI_PATH</code>
|
||||
</li>
|
||||
</ul>
|
||||
<p>If these are not set, default paths within the data directory will be
|
||||
used.</p>
|
||||
<h2>Fine-grained directory/path location</h2>
|
||||
<p>Apart from the data directory, some of the subdirectories of it can be
|
||||
moved elsewhere by changing an environment variable:</p>
|
||||
<figure class="table"
|
||||
style="width:100%;">
|
||||
<table class="ck-table-resized">
|
||||
<colgroup>
|
||||
<col style="width:30.48%;">
|
||||
<col style="width:39.54%;">
|
||||
<col style="width:29.98%;">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Environment variable</th>
|
||||
<th>Default value</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>TRILIUM_DOCUMENT_PATH</code>
|
||||
</td>
|
||||
<td><code>${TRILIUM_DATA_DIR}/document.db</code>
|
||||
</td>
|
||||
<td>Path to the <a class="reference-link" href="#root/pOsGYCXsbNQG/tC7s2alapj8V/_help_wX4HbRucYSDD">Database</a> (storing
|
||||
all notes and metadata).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>TRILIUM_BACKUP_DIR</code>
|
||||
</td>
|
||||
<td><code>${TRILIUM_DATA_DIR}/backup</code>
|
||||
</td>
|
||||
<td>Directory where automated <a class="reference-link" href="#root/pOsGYCXsbNQG/Otzi9La2YAUX/_help_ODY7qQn5m2FT">Backup</a> databases
|
||||
are stored.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>TRILIUM_LOG_DIR</code>
|
||||
</td>
|
||||
<td><code>${TRILIUM_DATA_DIR}/log</code>
|
||||
</td>
|
||||
<td>Directory where daily <a class="reference-link" href="#root/pOsGYCXsbNQG/BgmBlOIl72jZ/qzNzp9LYQyPT/_help_bnyigUA2UK7s">Backend (server) logs</a> are
|
||||
stored.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>TRILIUM_TMP_DIR</code>
|
||||
</td>
|
||||
<td><code>${TRILIUM_DATA_DIR}/tmp</code>
|
||||
</td>
|
||||
<td>Directory where temporary files are stored (for example when opening in
|
||||
an external app).</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>TRILIUM_ANONYMIZED_DB_DIR</code>
|
||||
</td>
|
||||
<td><code>${TRILIUM_DATA_DIR}/anonymized-db</code>
|
||||
</td>
|
||||
<td>Directory where a <a class="reference-link" href="#root/pOsGYCXsbNQG/BgmBlOIl72jZ/_help_x59R8J8KV5Bp">Anonymized Database</a> is
|
||||
stored.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>TRILIUM_CONFIG_INI_PATH</code>
|
||||
</td>
|
||||
<td><code>${TRILIUM_DATA_DIR}/config.ini</code>
|
||||
</td>
|
||||
<td>Path to <a class="reference-link" href="#root/pOsGYCXsbNQG/tC7s2alapj8V/_help_Gzjqa934BdH4">Configuration (config.ini or environment variables)</a> file.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</figure>
|
||||
21
docs/User Guide/!!!meta.json
vendored
21
docs/User Guide/!!!meta.json
vendored
@ -1534,6 +1534,27 @@
|
||||
"value": "bx bx-folder-open",
|
||||
"isInheritable": false,
|
||||
"position": 40
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "bnyigUA2UK7s",
|
||||
"isInheritable": false,
|
||||
"position": 50
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "x59R8J8KV5Bp",
|
||||
"isInheritable": false,
|
||||
"position": 60
|
||||
},
|
||||
{
|
||||
"type": "relation",
|
||||
"name": "internalLink",
|
||||
"value": "Gzjqa934BdH4",
|
||||
"isInheritable": false,
|
||||
"position": 70
|
||||
}
|
||||
],
|
||||
"format": "markdown",
|
||||
|
||||
@ -6,7 +6,7 @@ Data directory contains:
|
||||
* `backup` - contains automatically [backup](Backup.md) of documents
|
||||
* `log` - contains application log files
|
||||
|
||||
## Location
|
||||
## Location of the data directory
|
||||
|
||||
Easy way how to find out which data directory Trilium uses is to look at the "About Trilium Notes" dialog (from "Menu" in upper left corner):
|
||||
|
||||
@ -75,14 +75,15 @@ TRILIUM_DATA_DIR=/home/myuser/data/my-trilium-data trilium
|
||||
|
||||
You can then save the above command as a shell script on your path for convenience.
|
||||
|
||||
### Fine-grained directory/path location
|
||||
## Fine-grained directory/path location
|
||||
|
||||
It's possible to configure e.g. backup and log directories separately, with following environment variables:
|
||||
Apart from the data directory, some of the subdirectories of it can be moved elsewhere by changing an environment variable:
|
||||
|
||||
* `TRILIUM_DOCUMENT_PATH`
|
||||
* `TRILIUM_BACKUP_DIR`
|
||||
* `TRILIUM_LOG_DIR`
|
||||
* `TRILIUM_ANONYMIZED_DB_DIR`
|
||||
* `TRILIUM_CONFIG_INI_PATH`
|
||||
|
||||
If these are not set, default paths within the data directory will be used.
|
||||
| Environment variable | Default value | Description |
|
||||
| --- | --- | --- |
|
||||
| `TRILIUM_DOCUMENT_PATH` | `${TRILIUM_DATA_DIR}/document.db` | Path to the <a class="reference-link" href="../Advanced%20Usage/Database.md">Database</a> (storing all notes and metadata). |
|
||||
| `TRILIUM_BACKUP_DIR` | `${TRILIUM_DATA_DIR}/backup` | Directory where automated <a class="reference-link" href="Backup.md">Backup</a> databases are stored. |
|
||||
| `TRILIUM_LOG_DIR` | `${TRILIUM_DATA_DIR}/log` | Directory where daily <a class="reference-link" href="../Troubleshooting/Error%20logs/Backend%20(server)%20logs.md">Backend (server) logs</a> are stored. |
|
||||
| `TRILIUM_TMP_DIR` | `${TRILIUM_DATA_DIR}/tmp` | Directory where temporary files are stored (for example when opening in an external app). |
|
||||
| `TRILIUM_ANONYMIZED_DB_DIR` | `${TRILIUM_DATA_DIR}/anonymized-db` | Directory where a <a class="reference-link" href="../Troubleshooting/Anonymized%20Database.md">Anonymized Database</a> is stored. |
|
||||
| `TRILIUM_CONFIG_INI_PATH` | `${TRILIUM_DATA_DIR}/config.ini` | Path to <a class="reference-link" href="../Advanced%20Usage/Configuration%20(config.ini%20or%20e.md">Configuration (config.ini or environment variables)</a> file. |
|
||||
Loading…
x
Reference in New Issue
Block a user