3ef57bb2f5
polish: Week 2 improvements - error messages, progress, performance
...
## Error Message Improvements (Phase 1)
- ✅ Cluster backup: Added database type context to error messages
- ✅ Rate limiting: Show specific host and wait time in errors
- ✅ Connection failures: Added troubleshooting steps (3-point checklist)
- ✅ Encryption errors: Include backup location in failure messages
- ✅ Archive not found: Suggest cloud:// URI for remote backups
- ✅ Decryption: Hint about wrong key verification
- ✅ Backup directory: Include permission hints and --backup-dir suggestion
- ✅ Backup execution: Show database name and diagnostic checklist
- ✅ Incremental: Better base backup path guidance
- ✅ File verification: Indicate silent command failure possibility
## Progress Indicator Enhancements (Phase 2)
- ✅ ETA calculations: Real-time estimation based on transfer speed
- ✅ Speed formatting: formatSpeed() helper (B/KB/MB/GB per second)
- ✅ Byte formatting: formatBytes() with proper unit scaling
- ✅ Duration display: Improved to show Xm Ys format vs decimal
- ✅ Progress updates: Show [%] bytes/total (speed, ETA: time) format
## Performance Optimization (Phase 3)
- ✅ Buffer sizes: Increased stderr read buffers from 4KB to 64KB
- ✅ Scanner buffers: 64KB initial, 1MB max for command output
- ✅ I/O throughput: Better buffer alignment for streaming operations
## Code Cleanup (Phase 4)
- ✅ TODO comments: Converted to descriptive comments
- ✅ Method calls: Fixed GetDatabaseType() -> DisplayDatabaseType()
- ✅ Build verification: All changes compile successfully
## Summary
Time: ~1.5h (2-4h estimated)
Changed: 4 files (cmd/backup_impl.go, cmd/restore.go, internal/backup/engine.go, internal/progress/detailed.go)
Impact: Better UX, clearer errors, faster I/O, cleaner code
2025-11-26 10:30:29 +00:00
0cf21cd893
feat: Complete MEDIUM priority security features with testing
...
- Implemented TUI auto-select for automated testing
- Fixed TUI automation: autoSelectMsg handling in Update()
- Auto-database selection in DatabaseSelector
- Created focused test suite (test_as_postgres.sh)
- Created retention policy test (test_retention.sh)
- All 10 security tests passing
Features validated:
✅ Backup retention policy (30 days, min backups)
✅ Rate limiting (exponential backoff)
✅ Privilege checks (root detection)
✅ Resource limit validation
✅ Path sanitization
✅ Checksum verification (SHA-256)
✅ Audit logging
✅ Secure permissions
✅ Configuration persistence
✅ TUI automation framework
Test results: 10/10 passed
Backup files created with .dump, .sha256, .info
Retention cleanup verified (old files removed)
2025-11-25 15:25:56 +00:00