Backup examples

Retention and storage presets

Backup

Four presets covering common backup scenarios. Each file is a complete [backup] section you can drop into your config.

All retention policies work together: count (keep N most recent), age (delete after duration), and size (delete oldest when limit is exceeded).

See the backup guide for full documentation on retention, delta compression, and the klaudiush backup commands.

Minimal

5 snapshots, 7-day retention, 10MB limit. For tight disk budgets.

minimal.toml 19 lines
#:schema https://klaudiu.sh/schema/v1/config.json
# Minimal
# 5 snapshots, 7-day retention, 10MB limit. For tight disk budgets.

[backup]
enabled = true
auto_backup = true

# Keep only 5 most recent snapshots
max_backups = 5

# Keep snapshots for 7 days only
max_age = "168h"

# Maximum storage: 10MB
max_size = 10485760

# Async backups for better performance
async_backup = true
Basic

10 snapshots, 30-day retention, 50MB limit. Good default for most setups.

basic.toml 34 lines
#:schema https://klaudiu.sh/schema/v1/config.json
# Basic
# 10 snapshots, 30-day retention, 50MB limit. Good default for most setups.

[backup]
# Enable the backup system
enabled = true

# Automatically backup before config writes
auto_backup = true

# Keep maximum 10 snapshots per config directory
# Oldest snapshots deleted first when limit exceeded
max_backups = 10

# Keep snapshots for 30 days (720 hours)
# Snapshots older than this are deleted
max_age = "720h"

# Maximum total storage: 50MB (52428800 bytes)
# Oldest snapshots deleted when limit exceeded
max_size = 52428800

# Use async backups (non-blocking, faster)
# Set to false for critical operations requiring guaranteed backup
async_backup = true

# Delta compression settings (future use)
[backup.delta]
# Create full snapshot every 10 backups
full_snapshot_interval = 10

# Create full snapshot if last full snapshot is older than 7 days
full_snapshot_max_age = "168h"
Development

15 snapshots, 14-day retention. Tuned for frequent config changes.

development.toml 26 lines
#:schema https://klaudiu.sh/schema/v1/config.json
# Development
# 15 snapshots, 14-day retention. Tuned for frequent config changes.

[backup]
enabled = true
auto_backup = true

# Keep fewer snapshots (config changes frequently during dev)
max_backups = 15

# Keep snapshots for 14 days (good for development cycles)
max_age = "336h"

# Moderate storage limit
max_size = 52428800  # 50MB

# Async backups for minimal impact on development workflow
async_backup = true

[backup.delta]
# Standard full snapshot interval
full_snapshot_interval = 10

# Full snapshot every 7 days
full_snapshot_max_age = "168h"
Production

20 snapshots, 90-day retention, sync writes. No data loss.

production.toml 27 lines
#:schema https://klaudiu.sh/schema/v1/config.json
# Production
# 20 snapshots, 90-day retention, sync writes. No data loss.

[backup]
enabled = true
auto_backup = true

# Keep more snapshots in production
max_backups = 20

# Keep snapshots for 90 days
max_age = "2160h"

# Allow larger storage for production
max_size = 104857600  # 100MB

# Use sync backups to guarantee completion before proceeding
# Critical for production environments where backup integrity is paramount
async_backup = false

[backup.delta]
# Create full snapshot every 15 backups (more frequent full snapshots)
full_snapshot_interval = 15

# Create full snapshot every 3 days to ensure recovery points
full_snapshot_max_age = "72h"

© 2026 Smykla Skalski Labs