backdot
v1.8.1
Published
Lightweight CLI to backup dotfiles and gitignored files to a Git repo on a daily schedule
Maintainers
Readme
Getting started
npm install -g backdot
backdot initThis creates ~/.backdot.json with sensible defaults and walks you through setup. Open the config file and set your repository URL and the files you want backed up:
{
"repository": "[email protected]:USERNAME/backdot-backup.git",
"machine": "my-work-laptop",
"paths": ["~/.zshrc", "~/.oh-my-zsh/custom/*.zsh", "~/.ssh/config", "~/.npmrc"]
}Run your first backup:
backdot backupor configure the backport process to run automatically (daily at 2am)
backdot scheduleConfiguration
| Key | Description |
| ------- | ------------------------------------------------------ |
| paths | Glob patterns matching individual files or directories |
Prefix a pattern with ! to exclude matching files:
{
"paths": ["~/.config/ghostty/**", "!~/.config/ghostty/crash-reports/**"]
}Encryption
To encrypt files before they are pushed to the remote repo, add "encrypt": true to your config.
On first backup you'll be prompted for a password and offered to save it to ~/.backdot.key so that future backups do not prompt for a password.
Commands
| Command | Description |
| ------------------------------ | ---------------------------------------------- |
| init | Set up backdot for the first time |
| backup | Run a backup now |
| restore | Restore latest backup from the configured repo |
| restore <url> | Restore from a specific repo URL |
| restore [url] --commit <sha> | Restore from a specific backup commit |
| history [url] | Browse and restore a previous backup |
| schedule | Schedule automatic daily backup (Mac-only) |
| unschedule | Unschedule the daily backup |
| status | Show schedule and resolved file list |
Development
npm install
npm run build
npm startLicense
MIT
