bkr 1.0.0

Backup and restore tool for syncing files to AWS S3 with native zstd compression
Documentation
# 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

```bash
cargo install bkr
```

### From source

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

## Usage

```bash
# 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:

```yaml
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