Skip to content

CLI reference ​

bash
linuxbkup --help
linuxbkup help <command>
linuxbkup version

Env prefix: LINUXBKUP_* only. Examples use generic paths (/home/user, ~/Backups/linuxbkup/…).

Commands ​

CommandPurpose
inspectRead-only environment scan + default destination
planWhat backup would include/skip (no writes); --json
backupScan → stage → checksum → atomic tar.zst
restoreExtract → secrets → home/config rsync → Node reinstalls
verifyIntegrity check (archive or staging dir)
listHigh-level archive listing (thin)
depsTool status / install / How-To / one-command bootstrap
help / versionHelp and version

Global flags ​

FlagRole
-y, --yesSafe defaults (not destructive overwrite)
-a, --askInteractive decisions (wins over --yes)
-p, --profileeasy | balanced | strict
-n, --dry-runPlan only
-v / -d / -qVerbose / debug (implies -v) / quiet
-o, --outputArchive path
-u, --userTarget home owner
-k, --keep-stageKeep stage/extract dir (path printed)
-S, --stage-dirParent directory for staging
-m, --max-sizeAbort if staging exceeds SIZE (e.g. 2G)
-w, --workersParallelism cap (default 4)
-r / -RReclaim regenerables interactively / all
-i / -eInclude / exclude ERE (repeatable)
-j, --jsonMachine-readable (plan --json)
-f, --force-overwriteAllow restore overwrites
-F / -TList full / top-N
--skip-reinstallSkip Node reinstalls on restore
--reinstall-onlyManifest + installs only
--mark-secretTreat path as secret (repeatable)
--no-secrets / --secrets-plainExclude secrets / include unencrypted
--no-defaultsIgnore built-in path rules
--no-gitignoreDo not honor per-directory .gitignore
--no-color / --no-linksDisable ANSI / OSC 8

inspect ​

bash
linuxbkup inspect
linuxbkup inspect -F
linuxbkup -v inspect

plan ​

bash
linuxbkup plan
linuxbkup plan -F
linuxbkup plan --json
linuxbkup -y plan
linuxbkup -v plan          # per-path sizes (slower)

Unexpected paths: auto-include under -y / non-TTY; interactive under --ask.

backup ​

bash
linuxbkup -y backup
linuxbkup -o ~/Backups/linuxbkup/host.tar.zst backup
linuxbkup -k backup
linuxbkup -y -p strict -m 2G -w 8 backup
  • Stage path always printed; kept with -k
  • Atomic pack: *.tar.zst.tmp → verify → final name
  • Secrets: see secrets.md

restore ​

bash
linuxbkup -k -f restore ~/Backups/linuxbkup/host.tar.zst
sudo -E ./linuxbkup -k -f restore ~/Backups/linuxbkup/host.tar.zst
linuxbkup -k -f --skip-reinstall restore ~/Backups/linuxbkup/host.tar.zst
linuxbkup -y -f restore ~/Backups/linuxbkup/host.tar.zst
linuxbkup -y --reinstall-only restore ~/Backups/linuxbkup/host.tar.zst
  • Overwrite requires -f (or -a in a TTY) — never implied by -y
  • Extract path printed; kept with -k
  • Node reinstalls from packages/reinstalls.json; failures skip, never abort the run
  • TTY picker: e exclude · i include-only · p PM · g grep · f fzf · n none · u undo · Enter=all

verify ​

bash
linuxbkup verify ~/Backups/linuxbkup/host.tar.zst
linuxbkup verify /tmp/linuxbkup.<pid>.<rand>

Payload checksum mismatches fail. Missing schema.json / events drift → soft warnings.

deps ​

bash
linuxbkup deps
linuxbkup deps status
linuxbkup deps install
linuxbkup -y deps install all
linuxbkup deps howto zstd

Bootstrap families: apk · apt · pacman · pkg (Termux) · dnf · yum · brew.

Stage / extract paths ​

CommandPath
backup…/linuxbkup.<pid>.<rand>
backup -kprinted on success
restore (archive)…/linuxbkup-restore-<ts>.<pid> — printed; kept with -k
verify (archive)…/linuxbkup-verify-<ts>.<pid> — printed

Parent: -S or ${TMPDIR:-/tmp}.

Signals (TTY) ​

KeyBehavior
Ctrl+C[INT] notice → children stop → menu (r/s/c/q/x). Mid-reinstall q = soft-quit batch
Ctrl+ZSuspend whole job on backup and restore (fg/bg)

Wait after Ctrl+C: LINUXBKUP_INT_STOP_WAIT_DS (default 30 = 3s).

Hosts (summary) ​

GNU Linux happy path; Alpine/BusyBox/iSH/Termux best-effort via compat + deps. External FAT/exFAT/NTFS/9p: rsync metadata mode. Full matrix: platforms.md.

Bash-first Linux backup — no Node runtime in the CLI.