Restore
Locate snapshots
Section titled “Locate snapshots”# List all snapshotsvykar list
# List the 5 most recent snapshotsvykar list --last 5
# List snapshots for a specific sourcevykar list --source docsInspect snapshot contents
Section titled “Inspect snapshot contents”Snapshot-oriented commands take an exact snapshot ID, or latest.
# List files inside a snapshotvykar snapshot list a1b2c3d4
# List with details (type, permissions, size, mtime)vykar snapshot list a1b2c3d4 --long
# Limit listing to a subtreevykar snapshot list a1b2c3d4 --path src
# Sort listing by size (name, size, mtime)vykar snapshot list a1b2c3d4 --sort size
# Show snapshot metadata (time, source, sizes)vykar snapshot info a1b2c3d4
# Compare changed files between two snapshotsvykar snapshot diff a1b2c3d4 latestFind files across snapshots
Section titled “Find files across snapshots”Use snapshot find to locate files before choosing which snapshot to restore from.
# Find PDFs modified in the last 14 daysvykar snapshot find --name '*.pdf' --since 14d
# Limit search to one source and recent snapshotsvykar snapshot find --source docs --last 10 --name '*.docx'
# Search under a subtree with case-insensitive name matchingvykar snapshot find sub --iname 'report*' --since 7d
# Combine type and size filtersvykar snapshot find --type f --larger 1M --smaller 20M --since 30d--lastmust be>= 1.--sinceaccepts positive spans with suffixh,d,w,m(months), ory(for example:24h,7d,2w,6m,1y).--largermeans at least this size, and--smallermeans at most this size.
Restore to a directory
Section titled “Restore to a directory”# Restore all files from a snapshotvykar restore a1b2c3d4 /tmp/restored
# Restore the most recent snapshotvykar restore latest /tmp/restoredRestore applies extended attributes (xattrs) by default. Control this with the top-level xattrs.enabled config setting.
On a terminal, vykar restore shows a progress line on stderr: the files and bytes written against those planned so far. Above 100,000 files the totals grow batch by batch and are shown with a +. Nothing is printed when stderr is not a terminal.
Restore, like every read command, registers no session and needs only read access to the repository, so it runs while backups, prune or compact run elsewhere: data a concurrent compact moves is read from its new place. A snapshot that is deleted and compacted while it is being restored fails with “chunk … was removed from the repository while it was being read”; nothing is published to the destination. Run the restore again (of a snapshot that still exists), and run vykar check if the snapshot is still listed.
Restore part of a snapshot
Section titled “Restore part of a snapshot”--pattern takes a single glob, matched against paths as they are stored in the snapshot — exactly what vykar snapshot list prints. Check that form before writing a pattern.
# See the stored path form firstvykar snapshot list a1b2c3d4 | head
# Restore one subtree (the directory and everything under it)vykar restore a1b2c3d4 /tmp/restored --pattern 'reports*'
# Multi-source snapshot: paths carry the source prefixvykar restore a1b2c3d4 /tmp/restored --pattern 'home/user/documents/reports*'
# Every PDF, at any depthvykar restore a1b2c3d4 /tmp/restored --pattern '*.pdf'- Stored paths never begin with
/. Backing up the single source/home/user/documentsstoresreports/q1.pdf; with several sources each path is prefixed with the source’s absolute path minus the leading/, givinghome/user/documents/reports/q1.pdf. *spans/, soreports*already selects the whole subtree — no**needed, and*.pdfmatches at any depth. This differs fromsnapshot find --name, where*stops at a path separator.- The glob must match the whole path.
--pattern 'reports'restores only the directory itself, empty; usereports*to include its contents. - Quote the pattern, or your shell expands
*against the current directory before vykar sees it. - Files land under the destination at their full stored path: restoring
home/user/documents/reports*into/tmp/restoredgives/tmp/restored/home/user/documents/reports/. - A pattern whose leading path components contain no glob characters (
home/user/documents/reports*) reads only that part of the snapshot’s listing; a pattern starting with a glob character (*.pdf,reports*) reads all of it. - A pattern that matches nothing is not an error — restore reports
Restored: 0 files, 0 dirs, 0 symlinks. If you see that, re-check the paths withvykar snapshot list.
Important: patterns are matched against snapshot-relative paths, not absolute filesystem paths.
--pattern '/home/user/documents/reports/*'silently matches nothing. Drop the leading/and use the formvykar snapshot listshows.
Browse via WebDAV and browser UI (mount)
Section titled “Browse via WebDAV and browser UI (mount)”Browse snapshot contents via a local read-only WebDAV server. The same endpoint also serves a built-in HTML browser UI.
# Serve all snapshots (default: http://127.0.0.1:8080)vykar mount
# Serve a single snapshotvykar mount --snapshot a1b2c3d4
# Only snapshots from a specific sourcevykar mount --source docs
# Custom listen addressvykar mount --address 127.0.0.1:9090Snapshots and directories are loaded when first opened; with several snapshots, the server starts before any listing is read.
Restore from a damaged repository
Section titled “Restore from a damaged repository”By default a restore is all-or-nothing: if any chunk cannot be read or decoded, the run aborts with no restored files were published and the destination stays empty.
To salvage everything that is still intact, add --continue-on-error:
vykar restore latest /tmp/restored --continue-on-error- A file counts as damaged when any of its chunks is missing from the index, its pack is missing or unreadable (including a truncated pack), or a chunk fails to decrypt, decompress or verify. A chunk shared by several files damages all of them, and every hard link to a damaged file is damaged too.
- Damaged files are left out of the destination entirely, never written partially or as an empty placeholder. Everything that is restored has been fully read and verified.
- Each damaged file is printed on stderr as
damaged: <path>: <reason>, followed by a count. At most 10,000 are listed; the count is always exact. - The exit status is
3when at least one file was skipped, and0when none was. - Destination-side failures (disk full, permission errors), a damaged snapshot item list, and conflicting entries in the snapshot still abort the run.
- Remote storage errors count as damage too: an SFTP or S3 outage in the middle of a run produces a long damaged list and exit status 3 rather than an abort. Re-run the restore once the backend is reachable.
Afterwards, run vykar check --verify-data to find out what else in the repository is affected.
The desktop app always restores strictly; use the command line to restore around damage.
Next: Schedule Backups