Configure and Initialize
Generate a configuration file
Section titled “Generate a configuration file”Create a starter config:
vykar configOr write it to a specific path:
vykar config --dest ~/.config/vykar/config.yamlSee Config file locations for where vykar looks for it.
Configure repositories and sources
Section titled “Configure repositories and sources”Set the repository URL and the directories to back up:
repositories: - label: "main" url: "/backup/repo"
sources: - "/home/user/documents" - "/home/user/photos"The URL selects the backend — a local path, S3, SFTP, or a REST server. See Storage Backends for remote repositories and Configuration for all available options.
Encryption
Section titled “Encryption”Encryption is enabled by default (mode: "auto"). During init, vykar benchmarks AES-256-GCM and ChaCha20-Poly1305, chooses one, and stores that concrete mode in the repository config. No config is needed unless you want to force a mode. Every repository is encrypted; there is no unencrypted mode.
The passphrase is requested interactively at init time. You can also supply it via:
VYKAR_PASSPHRASEenvironment variablepasscommandin the config (e.g.passcommand: "pass show vykar")passphrasein the config
Initialize the repository
Section titled “Initialize the repository”vykar initThis creates the repository structure at the configured URL and prompts for a passphrase. When the storage does not pass vykar’s put-if-absent check, init also prints Commit mode: single-writer (<reason>): backups on that repository commit one at a time (see Commit mode).
If your config has multiple repositories, use --repo / -R to initialize one entry at a time:
vykar init --repo mainValidate
Section titled “Validate”Confirm the repository was created:
vykar infoRun a first backup and check results:
vykar backupvykar listBack up your repository key
Section titled “Back up your repository key”The passphrase alone is not enough to open an encrypted repository.
The master key is 64 bytes of random data generated at init; it is not
derived from your passphrase. The passphrase only derives a wrapping key
(Argon2id) that encrypts the master key, and the result — about 180 bytes — is
what lives at keys/repokey inside the repository. Both are required, and
neither can be recovered from the other. If the key blob is gone, the data is
gone, even with the correct passphrase.
Export it once and store it in the same password-manager entry as the passphrase:
vykar key export -R main -o vykar-repokey-main.txtThe export is a small armored text block, and it stays passphrase-protected —
there is deliberately no way to export the unwrapped master key. key export
unwraps the key before printing it, so it doubles as a check that your
passphrase and key file still work together. Without -o the block goes to
stdout, ready to pipe into a password manager. One export holds one
repository’s key, so with several repositories configured key export and
key import require -R.
To restore it — including into a repository that can no longer be opened, which is exactly when you need it:
vykar key import -R main vykar-repokey-main.txtvykar also keeps a second copy of the key inside the repository
(keys/repokey.2), written at init and backfilled into older repositories
the next time they are opened. If one copy rots, vykar opens off the other and
vykar check --repair rewrites the damaged one. That covers bit rot and
localized corruption — not loss of the storage as a whole, so it
complements an off-repository copy rather than replacing one.
Repository format
Section titled “Repository format”vykar init always creates a format v6 repository, whose chunk and pack IDs use BLAKE3 and whose chunk index is segmented. There is no flag or config key to choose otherwise. vykar info reports the format and hash of any repository.
Repositories created by vykar 0.24 and earlier (format v2, BLAKE2b, from 0.19 and earlier; format v3, BLAKE3) must be converted with vykar upgrade before any other command works on them: both become v6 (its config names the hash: blake2b for an upgraded v2 repository, blake3 otherwise). The hash is part of every chunk’s dedup identity and every pack’s storage key, so it never changes: a v2 repository stays BLAKE2b for life.
This matters in two situations:
- Older vykar binaries cannot open a v6 repository (
unsupported repository version: 6). If several machines share one repository, upgrade vykar on all of them together. - A self-hosted
vykar-servermust be upgraded first (0.30 or later, which supports the segmented index).initchecks this up front and refuses with a clear message rather than creating a repository whose first backup would fail. See Server Setup.
Next: Back Up