zadam cf99345962 use .js extension for require() as a preparation for future migration to ESM 11 月之前
..
inc cf99345962 use .js extension for require() as a preparation for future migration to ESM 11 月之前
README.md b499640db8 use trilium version number in asset paths to avoid caching issues WIP 2 年之前
dump-db.js cf99345962 use .js extension for require() as a preparation for future migration to ESM 11 月之前
package-lock.json df3212c304 Bump minimist from 1.2.5 to 1.2.7 in /dump-db 1 年之前
package.json 5481375347 DB dump tool feature complete 2 年之前

README.md

Trilium Notes DB dump tool

This is a simple tool to dump the content of Trilium's document.db onto filesystem.

It is meant as a last resort solution when the standard mean to access your data (through main Trilium application) fail.

Installation

This tool requires node.js, testing has been done on 16.18.0, but it will probably work on other versions as well.

npm install

Running

See output of node dump-db.js --help:

dump-db.js <path_to_document> <target_directory>

dump the contents of document.db into the target directory

Positionals:
path_to_document  path to the document.db
target_directory  path of the directory into which the notes should be dumped

Options:
--help             Show help                                         [boolean]
--version          Show version number                               [boolean]
--password         Set password to be able to decrypt protected notes.[string]
--include-deleted  If set to true, dump also deleted notes.
[boolean] [default: false]