This commit represents a significant architectural overhaul of vaultik: Database Schema Changes: - Switch files table to use UUID primary keys instead of path-based keys - Add UUID primary keys to blobs table for immediate chunk association - Update all foreign key relationships to use UUIDs - Add comprehensive schema documentation in DATAMODEL.md - Add SQLite busy timeout handling for concurrent operations Streaming and Performance Improvements: - Implement true streaming blob packing without intermediate storage - Add streaming chunk processing to reduce memory usage - Improve progress reporting with real-time metrics - Add upload metrics tracking in new uploads table CLI Refactoring: - Restructure CLI to use subcommands: snapshot create/list/purge/verify - Add store info command for S3 configuration display - Add custom duration parser supporting days/weeks/months/years - Remove old backup.go in favor of enhanced snapshot.go - Add --cron flag for silent operation Configuration Changes: - Remove unused index_prefix configuration option - Add support for snapshot pruning retention policies - Improve configuration validation and error messages Testing Improvements: - Add comprehensive repository tests with edge cases - Add cascade delete debugging tests - Fix concurrent operation tests to use SQLite busy timeout - Remove tolerance for SQLITE_BUSY errors in tests Documentation: - Add MIT LICENSE file - Update README with new command structure - Add comprehensive DATAMODEL.md explaining database schema - Update DESIGN.md with UUID-based architecture Other Changes: - Add test-config.yml for testing - Update Makefile with better test output formatting - Fix various race conditions in concurrent operations - Improve error handling throughout
140 lines
3.4 KiB
YAML
140 lines
3.4 KiB
YAML
# vaultik configuration file example
|
|
# This file shows all available configuration options with their default values
|
|
# Copy this file and uncomment/modify the values you need
|
|
|
|
# Age recipient public key for encryption
|
|
# This is REQUIRED - backups are encrypted to this public key
|
|
# Generate with: age-keygen | grep "public key"
|
|
age_recipient: age1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
|
|
# List of directories to backup
|
|
# These paths will be scanned recursively for files to backup
|
|
# Use absolute paths
|
|
source_dirs:
|
|
- /
|
|
# - /home
|
|
# - /etc
|
|
# - /var
|
|
|
|
# Patterns to exclude from backup
|
|
# Uses glob patterns to match file paths
|
|
# Paths are matched as absolute paths
|
|
exclude:
|
|
# System directories that should not be backed up
|
|
- /proc
|
|
- /sys
|
|
- /dev
|
|
- /run
|
|
- /tmp
|
|
- /var/tmp
|
|
- /var/run
|
|
- /var/lock
|
|
- /var/cache
|
|
- /lost+found
|
|
- /media
|
|
- /mnt
|
|
# Swap files
|
|
- /swapfile
|
|
- /swap.img
|
|
- "*.swap"
|
|
- "*.swp"
|
|
# Log files (optional - you may want to keep some logs)
|
|
- "*.log"
|
|
- "*.log.*"
|
|
- /var/log
|
|
# Package manager caches
|
|
- /var/cache/apt
|
|
- /var/cache/yum
|
|
- /var/cache/dnf
|
|
- /var/cache/pacman
|
|
# User caches and temporary files
|
|
- "*/.cache"
|
|
- "*/.local/share/Trash"
|
|
- "*/Downloads"
|
|
- "*/.thumbnails"
|
|
# Development artifacts
|
|
- "**/node_modules"
|
|
- "**/.git/objects"
|
|
- "**/target"
|
|
- "**/build"
|
|
- "**/__pycache__"
|
|
- "**/*.pyc"
|
|
# Large files you might not want to backup
|
|
- "*.iso"
|
|
- "*.img"
|
|
- "*.vmdk"
|
|
- "*.vdi"
|
|
- "*.qcow2"
|
|
|
|
# S3-compatible storage configuration
|
|
s3:
|
|
# S3-compatible endpoint URL
|
|
# Examples: https://s3.amazonaws.com, https://storage.googleapis.com
|
|
endpoint: https://s3.example.com
|
|
|
|
# Bucket name where backups will be stored
|
|
bucket: my-backup-bucket
|
|
|
|
# Prefix (folder) within the bucket for this host's backups
|
|
# Useful for organizing backups from multiple hosts
|
|
# Default: empty (root of bucket)
|
|
#prefix: "hosts/myserver/"
|
|
|
|
# S3 access credentials
|
|
access_key_id: your-access-key
|
|
secret_access_key: your-secret-key
|
|
|
|
# S3 region
|
|
# Default: us-east-1
|
|
#region: us-east-1
|
|
|
|
# Use SSL/TLS for S3 connections
|
|
# Default: true
|
|
#use_ssl: true
|
|
|
|
# Part size for multipart uploads
|
|
# Minimum 5MB, affects memory usage during upload
|
|
# Supports: 5MB, 10M, 100MiB, etc.
|
|
# Default: 5MB
|
|
#part_size: 5MB
|
|
|
|
# How often to run backups in daemon mode
|
|
# Format: 1h, 30m, 24h, etc
|
|
# Default: 1h
|
|
#backup_interval: 1h
|
|
|
|
# How often to do a full filesystem scan in daemon mode
|
|
# Between full scans, inotify is used to detect changes
|
|
# Default: 24h
|
|
#full_scan_interval: 24h
|
|
|
|
# Minimum time between backup runs in daemon mode
|
|
# Prevents backups from running too frequently
|
|
# Default: 15m
|
|
#min_time_between_run: 15m
|
|
|
|
# Path to local SQLite index database
|
|
# This database tracks file state for incremental backups
|
|
# Default: /var/lib/vaultik/index.sqlite
|
|
#index_path: /var/lib/vaultik/index.sqlite
|
|
|
|
# Average chunk size for content-defined chunking
|
|
# Smaller chunks = better deduplication but more metadata
|
|
# Supports: 10MB, 5M, 1GB, 500KB, 64MiB, etc.
|
|
# Default: 10MB
|
|
#chunk_size: 10MB
|
|
|
|
# Maximum blob size
|
|
# Multiple chunks are packed into blobs up to this size
|
|
# Supports: 1GB, 10G, 500MB, 1GiB, etc.
|
|
# Default: 10GB
|
|
#blob_size_limit: 10GB
|
|
|
|
# Compression level (1-19)
|
|
# Higher = better compression but slower
|
|
# Default: 3
|
|
#compression_level: 3
|
|
|
|
# Hostname to use in backup metadata
|
|
# Default: system hostname
|
|
#hostname: myserver |