bkr

Crates.iobkr
lib.rsbkr
version1.0.0
created_at2026-01-24 19:15:03.227639+00
updated_at2026-01-24 19:15:03.227639+00
descriptionBackup and restore tool for syncing files to AWS S3 with native zstd compression
homepagehttps://github.com/goodwokdev/flow-bkr
repositoryhttps://github.com/goodwokdev/flow-bkr
max_upload_size
id2067289
size225,038
(DawnBreather)

documentation

https://docs.rs/bkr

README

bkr

A self-contained backup and restore tool for syncing files to AWS S3 with native zstd compression.

Features

  • Self-contained binary - No external dependencies (zstd compiled in)
  • Native zstd compression - Compress directories before upload
  • Incremental backups - Only uploads changed files (MD5 comparison)
  • Smart archive optimization - Mtime fast-path skips unchanged archives
  • Cross-platform daemon - macOS (launchd), Linux (systemd), Windows (Task Scheduler)
  • YAML configuration - Simple, readable config format

Installation

From crates.io

cargo install bkr

From source

git clone https://github.com/user/baker
cd baker/.ports/rust
cargo build --release

Usage

# Validate configuration
bkr validate -c backup.conf.yml

# Backup files to S3
bkr backup -c backup.conf.yml

# Restore files from S3
bkr restore -c backup.conf.yml

# Dry-run (simulate without changes)
bkr backup --dry-run -c backup.conf.yml

# Install scheduled daemon
bkr daemon-install -c backup.conf.yml

Configuration

Create a backup.conf.yml file:

storage:
  profile: default          # AWS profile name
  region: us-west-2
  bucket:
    name: my-backup-bucket
    prefix: my-workstation  # Optional prefix for all backups

  restore:
    path: ~/.backups        # Where to restore files
    bucket_prefix: ""       # Restore from bucket root

to_backup:
  my-config:
    path: ~/.config
    destination_prefix: config
    ignore:
      - "*.log"
      - "cache/"

  my-project:
    path: ~/projects/app
    destination_prefix: projects
    ignore:
      - ".git"
      - "target/"
    zstd:                   # Directories to compress
      - node_modules
      - dist
    zstd_level: 3           # Compression level (1-22)

daemon_schedule:
  every: 1h                 # Backup interval
  exercise_restore: false   # Also run restore on schedule

Commands

Command Description
backup Backup files to S3
restore Restore files from S3
list List backup configuration
validate Validate configuration file
daemon-install Install scheduled backup daemon
daemon-uninstall Remove scheduled backup daemon
daemon-status Check daemon status

Options

Option Description
-c, --config <path> Path to config file
-v, --verbose Verbose output
--dry-run Simulate without making changes
--no-user-interaction Skip confirmation prompts

License

MIT

Commit count: 3

cargo fmt