- Added ETA estimation section with examples
- Documented authentication detection and smart guidance
- Added MariaDB support details
- Expanded PostgreSQL authentication section with 4 solutions
- Added troubleshooting for authentication errors
- Updated recent changes with November 2025 features
- Added links to new documentation files
- Fixed type mismatch in disk space calculation (int64 casting)
- Created platform-specific disk space implementations:
* diskspace_unix.go (Linux, macOS, FreeBSD)
* diskspace_windows.go (Windows)
* diskspace_bsd.go (OpenBSD)
* diskspace_netbsd.go (NetBSD fallback)
- All 10 platforms now compile successfully:
✅ Linux (amd64, arm64, armv7)
✅ macOS (Intel, Apple Silicon)
✅ Windows (amd64, arm64)
✅ FreeBSD, OpenBSD, NetBSD
Phase 1: Detection & Guidance
- Detect OS user vs DB user mismatch
- Identify PostgreSQL authentication method (peer/ident/md5)
- Show helpful error messages with 4 solutions:
1. sudo -u <user> (for peer auth)
2. ~/.pgpass file (recommended)
3. PGPASSWORD env variable
4. --password flag
Phase 2: pgpass Support
- Auto-load passwords from ~/.pgpass file
- Support standard PostgreSQL pgpass format
- Check file permissions (must be 0600)
- Support wildcard matching (host:port:db:user:pass)
Tested on CentOS Stream 10 with PostgreSQL 16
- 12 test functions covering all estimator functionality
- Tests for progress tracking, time calculations, formatting
- Tests for edge cases (zero items, no progress, etc.)
- All tests passing (12/12)
- Created internal/progress/estimator.go with ETAEstimator component
- Tracks elapsed time and estimates remaining time based on progress
- Enhanced Spinner and LineByLine indicators to display ETA info
- Integrated into BackupCluster and RestoreCluster functions
- Display format: 'Operation | X/Y (Z%) | Elapsed: Xm | ETA: ~Ym remaining'
- Preserves spinner animation while showing progress/time estimates
- Quick Win approach: no historical data storage, just current operation tracking
PROBLEM:
- History displayed ALL entries at once
- With many backups, first entries scroll off screen
- Cursor navigation worked but selection was invisible
- User had to "blindly" navigate 5+ entries to see anything
SOLUTION:
- Added viewport with max 15 visible items at once
- Viewport auto-scrolls to follow cursor position
- Scroll indicators show when there are more entries:
* "▲ More entries above..."
* "▼ X more entries below..."
- Cursor always visible within viewport
RESULT:
- ✅ Always see current selection
- ✅ Works with any number of history entries
- ✅ Clear visual feedback with scroll indicators
- ✅ Smooth navigation experience
FIXED:
- Removed unused cursor variable that was always a space
- Arrow up/down now visibly highlights selected item
- Added position counter (Viewing X/Y)
- Changed selection indicator from ">" to "→"
- Explicit cursor initialization to 0
RESULT:
- ↑/↓ keys now work and show visual feedback
- Current selection clearly visible with highlight
- Position indicator shows which item is selected
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
- Cluster restores restore multiple databases, not a single target
- Database existence check was failing with exit status 2
- Now shows "Will restore all databases from cluster backup" instead
- Removes confusing warning for cluster restore operations
- Some terminals send ctrl+h instead of backspace
- Added ctrl+h handling in settings.go and input.go
- Ensures backspace works in all terminal emulators