dotback is a CLI that backs up dotfiles by copying files/directories defined in a TOML config.
- Single static binary, no runtime environment required.
- Focused scope: backup only.
- Plain copy workflow (no symlink management, no restore workflow).
- Optional post-backup commands (
after-backup).
Download a release binary from releases, or install with Go:
go install github.com/pspiagicw/dotback@latestInstall directly from GitHub releases (fresh system, no clone/build required):
curl -fsSL https://raw.githubusercontent.com/pspiagicw/dotback/main/install.sh | bashThe installer places dotback in /usr/local/bin when writable, otherwise ~/.local/bin.
You can also pin a release tag:
curl -fsSL https://raw.githubusercontent.com/pspiagicw/dotback/main/install.sh | VERSION=v0.1.0 bashIf you use gox:
gox install github.com/pspiagicw/dotback@latestDefault config path:
$XDG_CONFIG_HOME/dotback/backup.toml(typically~/.config/dotback/backup.toml)
You can print a starter config:
dotback --example-configYou can inspect loaded config values:
dotback configstoreDir(required): destination root for backups. Created if missing.[backup.<name>](required): each rule must include:location(required): file or directory to copy.after-backup(optional): commands to run after backup completes.ignore(optional): glob patterns used to skip paths during copy.
Example:
storeDir = "~/.local/state/backup"
after-backup = [
"tar -czf ~/.local/state/backup.tgz ~/.local/state/backup"
]
ignore = [
"*/node_modules/*",
"*/.cache/*"
]
[backup.nvim]
location = "~/.config/nvim"
[backup.gitconfig]
location = "~/.gitconfig"More examples: backup.example.toml.
Global flags:
--config: alternate config file path.--example-config: print an example config and exit.
Back up all configured rules:
dotback backupBack up selected rules:
dotback backup nvim gitconfigBack up all except selected rules:
dotback backup --ignore nvim neomuttShow planned operations without copying:
dotback backup --dry-runUse an alternate config:
dotback --config /absolute/path/to/backup.toml backupRun without interactive prompts (CI/cron):
dotback backup --non-interactive --no-after-backupList configured backup rule names:
dotback listNotes:
dotback backupasks for confirmation before starting.- If
after-backupis configured,dotbackasks before running those commands. .gitdirectories are always skipped during directory copy..gitignorefiles are skipped during copy.
- Not incremental/versioned backup.
- Not scheduling/automation (use cron/systemd).
- Not sync/replication across machines (use rsync/syncthing/etc.).
- Not a restore/installer tool.
- Rule targets with the same basename can overwrite each other in
storeDirbecause destination uses the source basename.
- If you include sensitive paths (for example
~/.ssh,~/.gnupg, password stores), securestoreDirwith strict permissions. - If you copy backups to remote storage in
after-backup, ensure transport and destination are encrypted/protected.
Contributions are welcome on GitHub.


