added backup

azivner 2018-09-01 10:04:08 +02:00
parent 5dce73836c
commit 52c4f3d1ef
5 changed files with 21 additions and 10 deletions

12
Backup.md Normal file

@ -0,0 +1,12 @@
Trilium supports simple backup scheme where it saves copy of the [[document]] on these events:
* once a day
* once a week
* once a month
* before DB migration to newer version
So in total you'll have at most 4 backups from different points in time which should protect you from various problems. These backups are stored by default in `~/trilium-data/backup`.
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.

@ -20,9 +20,9 @@ The issue here is that Bash is both programming language and tool (shell) very m
## Solution
Solution to the problem shown above is to allow notes to have multiple parents.
I call these "clones", but it is a bit misleading - there's no original and cloned note - both of these are indistinguishable.
I call these "clones", but it is a bit misleading - there's no original and cloned note - both of the parents are completely equal.
Another misleading thing about "cloning" is that it suggests that has been made a copy of the note - that's not really true - note itself stays in just one copy, they are just referenced in multiple places in the hierarchy. So of course change in one place affects all other.
Another misleading thing about "cloning" is that it suggests that has been made a copy of the note - that's not really true - note itself stays in just one copy, they are just referenced in multiple places in the hierarchy. So of course change in one place affects all other. Possibly better way how to think about it is the idea that a single note (and its subtree) is *placed* into multiple places in the tree.
Here's the final structure with cloning:
@ -43,18 +43,14 @@ So now the "Bash" subtree appears on multiple locations in the hierarchy.
### Demo
[[gifs/create-clone.gif]]
In the demo, you can see how clone can be created using context menu. It's possible to do this also using Recent notes and Jump to dialogs which is useful in some contexts.
In the demo, you can see how clone can be created using context menu. It's possible to do this also using Add Link dialog or with CTRL+C and CTRL+V shortcuts.
You can also notice how after creating the clone, all clones are highlighted. This is so you can easily see which notes are cloned into other locations in the hierarchy.
When you click on the clone, you can also see in the bottom of the left pane list of all locations of the clone which allows you to switch easily between them.
## Prefix
**Note that this is experimental feature and might be removed in the future.**
Since notes can be categorized into multiple places, it's important to choose name which fits into both (all) locations.
In some cases this isn't possible so Trilium provides "tree prefix" which is shown before the note name in the tree and as such provides kind of context.
In some cases this isn't possible so Trilium provides "branch prefix" which is shown before the note name in the tree and as such provides kind of context.
Prefix is location specific so it's displayed only in the tree pane.
## Deleting notes/clones

@ -14,4 +14,6 @@ Replace [VERSION] for actual latest version. It's not recommended to use "latest
~~~~
sudo docker run -t -i -p 8080:8080 -v ~/trilium-data:/home/[myuser]/trilium-data zadam/trilium:latest
~~~~
~~~~
Command above is mounting volume to the host system so that trilium's data (most importantly [[document]]) is persisted and not cleared after container stops.

@ -1,4 +1,4 @@
Document is [SQLite](https://www.sqlite.org) database which contains all notes, tree structure, metadata, even some of the configuration.
Document is [SQLite](https://www.sqlite.org) database which contains all notes, tree structure, metadata and most of the configuration.
It's stored in single file, by default in `trilium-data/document.db`

@ -10,6 +10,7 @@
* [[Cloning notes]]
* [[Protected notes]]
* [[Search]]
* [[Backup]]
* [[Keyboard shortcuts]]
* [[Themes]]
* Installation & setup