Add automated backup system with SQLite VACUUM
- Implement backup package with SQLite VACUUM INTO for safe backups - Add scheduler with configurable interval (default: 24h) - Add retention policy with automatic cleanup (default: 7 days) - Add optional gzip compression (~10x size reduction) - Add comprehensive tests for backup creation and cleanup - Integrate backup scheduler in main.go with graceful shutdown - Add backup configuration variables (BACKUP_ENABLED, BACKUP_INTERVAL, BACKUP_RETENTION_DAYS, BACKUP_PATH, BACKUP_COMPRESS) - Backups run automatically in background goroutine - Coverage: backup package 52.7%
This commit is contained in:
@@ -29,3 +29,10 @@ REGISTRATION_MODE=open
|
||||
# Logging Configuration
|
||||
LOG_LEVEL=info
|
||||
ENVIRONMENT=production
|
||||
|
||||
# Backup Configuration
|
||||
BACKUP_ENABLED=false
|
||||
BACKUP_INTERVAL=24h
|
||||
BACKUP_RETENTION_DAYS=7
|
||||
BACKUP_PATH=./data/backups
|
||||
BACKUP_COMPRESS=true
|
||||
|
||||
Reference in New Issue
Block a user