Trilium Notes backup into another machine

As Trilium Notes announcing maintenance mode I decided finally at least create the back up outside of Umbrel.

Here is the step by step how transfer backup:

  1. ssh into Umbrel and pull files out of container:

docker ps --format “{{.Names}}” --this print names of running containers, ‘trilium-notes_server_1’ is the one needed

pwd --will show the working directory we have and in case of umbrel it’s ‘/home/umbrel’

mkdir trilium_backup --this create folder for storing a backup from container

docker cp trilium-notes_server_1:/data/backup /home/umbrel/trilium_backup --will copy content of backup into previously created folder

The backup process for Trilium is described here

  1. in case you using Win10/11 download pscp (same source as Putty many using for SSH - it even should be installed with it already) otherwise for Linux there is already scp present.

If you’re logged from Linux machine it should work from the present SSH you’re in:

scp -v -p 22 /home/umbrel/trilium_backup/* 192.168.1.2:/home/backup_target

If using Win, navigate in location where pscp is downloaded - wrote ‘cmd’ into path in upper part of the folder window/in cmd navigate into that folder.

and from here run: pscp -p 22 umbrel@192.168.1.22:/home/umbrel/trilium_backup/* C:\Users\<some_user_name>\Downloads\back_up_target

you will be prompted for password as the log-in is from Win machine into the Umbrel.

Check the files if they are present and if so, back in Umbrel run: rm -rf trilium_backup so it’s removed from SD card.