From ff7543c827253d27152c1052e293054c3ed7d57f Mon Sep 17 00:00:00 2001 From: zadam Date: Sun, 1 Nov 2020 21:22:33 +0100 Subject: [PATCH] Updated Data directory (markdown) --- Data directory.md => Data-directory.md | 33 +++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) rename Data directory.md => Data-directory.md (64%) diff --git a/Data directory.md b/Data-directory.md similarity index 64% rename from Data directory.md rename to Data-directory.md index f3314aa..dce4eeb 100644 --- a/Data directory.md +++ b/Data-directory.md @@ -24,12 +24,43 @@ If you want to backup your Trilium data, just backup this single file - it conta ### Changing the location of data directory -If you want to use some other location for the data directory than the default one, you may change it via TRILIUM_DATA_DIR environment variable to some other location, e.g.: +If you want to use some other location for the data directory than the default one, you may change it via TRILIUM_DATA_DIR environment variable to some other location: + +#### Linux ``` export TRILIUM_DATA_DIR=/home/myuser/data/my-trilium-data ``` +#### Mac OS X + +You need to create a .plist file under `~/Library/LaunchAgents` to load it properly each login. + +To load it manually, u need to use `launchctl setenv TRILIUM_DATA_DIR ` + +Here is a pre-defined template, where you just need to add your path to: + +```xml + + + + + + Label + set.trium.env + RunAtLoad + + ProgramArguments + + launchctl + setenv + TRILIUM_DATA_DIR + /Users/def/Library/Application Support/trilium-data + + + +``` + ### Create a script to run with specific data directory And alternative to globally setting environment variable is to run only the Trilium Notes with this environment variable. This then allows for different setup styles like two [[document]] instances or "portable" installation.