a8ce8c4457
Fix format detection: check file content for PGDMP signature, not just extension
2025-11-07 12:39:09 +00:00
95ea807d18
Quality improvements: Remove dead code, add unit tests, fix ignored errors
...
HIGH PRIORITY FIXES:
1. Remove unused progressCallback mechanism (dead code cleanup)
2. Add unit tests for restore package (formats, safety checks)
- Test coverage for archive format detection
- Test coverage for safety validation
- Added NullLogger for testing
3. Fix ignored errors in backup pipeline
- Handle StdoutPipe() errors properly
- Log stderr pipe errors
- Document CPU detection errors
IMPROVEMENTS:
- formats_test.go: 8 test functions, all passing
- safety_test.go: 6 test functions for validation
- logger/null.go: Test helper for unit tests
- Proper error handling in streaming compression
- Fixed indentation in stderr handling
2025-11-07 11:47:07 +00:00
2b868f859c
Add rotating spinner to TUI status for visual progress feedback
2025-11-07 11:20:36 +00:00
07ab4109ec
Fix: Disable stdout progress in TUI mode to prevent display breaking
2025-11-07 10:50:45 +00:00
281934be38
Fix: Enable --clean flag for cluster restore to handle existing tables
2025-11-07 10:46:27 +00:00
98fa594f59
Fix: Ctrl+C now works in TUI, improve database creation with peer auth support
2025-11-07 10:35:24 +00:00
cd7a66aab3
Fix: Ensure databases exist before cluster restore - resolves 11 failures issue
2025-11-07 10:27:03 +00:00
87e0ca3b39
feat: implement full restore functionality with TUI integration
...
- Add complete restore engine (internal/restore/)
- RestoreSingle() for single database restore
- RestoreCluster() for full cluster restore
- Archive format detection (7 formats supported)
- Safety validation (integrity, disk space, tools)
- Streaming decompression with pigz support
- Add CLI restore commands (cmd/restore.go)
- restore single: restore single database backup
- restore cluster: restore full cluster backup
- restore list: list available backup archives
- Safety-first design: dry-run by default, --confirm required
- Add TUI restore integration (internal/tui/)
- Archive browser: browse and select backups
- Restore preview: safety checks and confirmation
- Restore execution: real-time progress tracking
- Backup manager: comprehensive archive management
- Features:
- Format auto-detection (.dump, .dump.gz, .sql, .sql.gz, .tar.gz)
- Archive validation before restore
- Disk space verification
- Tool availability checks
- Target database configuration
- Clean-first and create-if-missing options
- Parallel decompression support
- Progress tracking with phases
Phase 1 (Core Functionality) complete and tested
2025-11-07 09:41:44 +00:00