diff --git a/Backup.md b/Backup.md index a250083..949a080 100644 --- a/Backup.md +++ b/Backup.md @@ -9,4 +9,17 @@ So in total you'll have at most 4 backups from different points in time which sh This is only very basic backup solution and you're encouraged to add some better backup solution - e.g. backing up the [[document]] to cloud / different computer etc. -Note that [[synchronization]] provides also some backup capabilities by its nature of distributing the data to other computers. \ No newline at end of file +Note that [[synchronization]] provides also some backup capabilities by its nature of distributing the data to other computers. + +# Restoring backup + +Let's assume you want to restore the weekly backup, here's how to do it: + +* find [[data directory]] Trilium uses - easy way is to open "About Trilium Notes" from "Menu" in upper left corner and looking at "data directory" + * I'll refer to `~/trilium-data` as data directory from now on +* find `~/trilium-data/backup/backup-weekly.db` - this is the [[document]] backup +* at this point stop/kill Trilium +* copy and rename this `~/trilium-data/backup/backup-weekly.db` to `~/trilium-data/document.db` - this will delete the current state of the [[document]] so you might want to back it up somewhere else +* start Trilium again + +If you have configured sync then you need to do it across all members of the sync cluster, otherwise older version (restored backup) of the document will be detected and synced to the newer version. diff --git a/Data directory.md b/Data directory.md index d30061c..d8faf7a 100644 --- a/Data directory.md +++ b/Data directory.md @@ -6,6 +6,12 @@ Data directory contains: * `log` - contains application log files ## Location +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): + +[[images/about-trilium-data-dir.png]] + +Here's how the location is decided: + Data directory is normally named `trilium-data` and it is stored in: * `/home/[user]/.local/share` for Linux diff --git a/images/about-trilium-data-dir.png b/images/about-trilium-data-dir.png new file mode 100644 index 0000000..842a3e3 Binary files /dev/null and b/images/about-trilium-data-dir.png differ diff --git a/images/note-revisions.png b/images/note-revisions.png index b950d56..a313334 100644 Binary files a/images/note-revisions.png and b/images/note-revisions.png differ diff --git a/images/sync-config.png b/images/sync-config.png index 226885c..6816280 100644 Binary files a/images/sync-config.png and b/images/sync-config.png differ