Import and backup
On this page
Bring your notes in with one command, read any note back as plain Markdown, and keep a backup of the whole vault.
Import from Obsidian#
notegraph import ~/path/to/your/vault
Import reads a folder of Markdown notes and attachments. Each note becomes one change by import, and the
whole run is one session, so you can undo it as one. Links, frontmatter and tags are read from the note text. Your
Obsidian folder does not change.
--dry-runprints what an import would do and writes nothing.--jsonprints the report as one JSON object.--allow-largeimports a folder above the total size guard.
To undo an import, find its session with notegraph log --actor import and run
notegraph revert --session <id> --dry-run to see the plan. See
Undo an agent session.
Import again#
You can run the same import again. A note that has not changed since the last import stays as it is and is counted as unchanged. Only changed notes become new changes. A note whose text changed in the folder becomes one new change, and the earlier text stays in the history.
What import skips#
The report lists each skipped file with its reason. These are skipped:
- folders and files whose name starts with a dot, such as
.obsidian. The report names the folders on one line and does not count them as skipped; - symbolic links, with the reason (a link out of the folder, or a loop);
- a note larger than 1 MiB, and an attachment larger than 50 MiB;
- a folder deeper than 64 levels;
- a file that is not a regular file, such as a named pipe;
- names that a note path cannot hold, and Windows reserved names;
- a file whose name matches an earlier file apart from letter case or Unicode form. notegraph does not rename it. It skips it and names the file it collides with.
A note with broken frontmatter is not skipped. It is imported as plain text and listed under parse problems.
Read a note as Markdown#
There is no export command in this version, and notegraph does not keep a Markdown mirror of the vault. To get one note out as the exact bytes that notegraph holds, write it to a file:
notegraph show projects/alpha.md --raw > alpha.md
--raw refuses to write to a terminal. A file you write this way is plain text outside the vault. The
deny list does not cover it. See the warning on the privacy page.
Back up and restore#
notegraph backup ~/notegraph.bak
backup writes a copy of the store to a file that does not exist yet. Only you can read the file, and it
does not hold your sync secrets. It holds your notes and their full history, in plain form, so keep it where you keep
other private files.
notegraph restore ~/notegraph.bak
restore replaces the store with the backup. It asks first, keeps the store it replaced as
store.sqlite.pre-restore, and gives this device a new device ID. If sync was on, it tells you what to do
next; you may need notegraph pair --recover.