Conversation
tis24dev
commented
Feb 5, 2026
- Clean up parse comment and fill UpgradeResult
- logging: capture issues and add counters
- Add granular PBS collection toggles & log summary
- Improve PVE manifest logging and cluster handling
- Remove BASE_DIR & CRON_ from backup.env*
- Improve network IP parsing and rollback UI
- Remove live countdowns from prompts
- Add recipient auto-detection for email notifier
- Bump Go toolchain to 1.25.7
Remove duplicated comment lines above Config.parse to avoid redundant documentation. In computeConfigUpgrade, ensure UpgradeResult is fully populated (MissingKeys, ExtraKeys, CaseConflictKeys, PreservedValues, Warnings) when no content changes are detected so callers receive complete upgrade metadata.
Add an issueLines slice to Logger and capture WARNING/ERROR/CRITICAL log entries in logWithLabel as single-line entries (sanitizing CR/LF) for end-of-run summaries. Introduce thread-safe accessors WarningCount, ErrorCount and IssueLines to retrieve counts and the captured issue lines. Import strings to support sanitization. Also includes an updated .backup.lock metadata change (pid/time).
Introduce fine-grained PBS collection flags (S3 endpoints, node config, ACME accounts/plugins, metric servers, traffic control, PBS network config) across config, collector, orchestrator and env templates so subcomponents can be independently enabled/disabled. Update collector logic to respect these flags (exclude files, skip commands and snapshots when disabled) and extend collectPBSConfigFile to accept a disable-hint used in clearer log messages. Add a final-run summary that prints WARNING/ERROR log lines to help surface root causes. Update docs, tests and templates to reflect the new options.
Refactor populatePVEManifest to always initialize the manifest and introduce manifestLogOpts + logEntry for consistent, descriptive logging and counting of missing files. Update record(...) calls to include descriptions, disable hints, and not-found counting for PVE config items. Rework collectPVEDirectories cluster logic to separate BackupClusterConfig checks from clustered/node-specific actions, use c.systemPath for authkey, and adjust copy/skip logging behavior. Tune log levels/messages for firewall, VZDump and Ceph detection. Add a note in the backup.env template explaining that enabled-but-unconfigured features emit warnings and can be disabled via BACKUP_* flags.
Stop writing BASE_DIR and CRON_* values into backup.env since BASE_DIR is now auto-detected and cron scheduling is managed via crontab. Changes include: - CLI and TUI installers no longer set BASE_DIR or CRON_* in generated env files; added unsetEnvValue helper to strip keys from templates. - Config upgrade now prunes deprecated keys (BASE_DIR, CRON_SCHEDULE, CRON_HOUR, CRON_MINUTE), emits a warning, and only rewrites the file when there are missing keys or pruned lines. - Added unit tests to verify pruning behavior and updated TUI tests to expect these keys to be removed. - Documentation updated to note BASE_DIR is auto-detected. - Minor update to internal/orchestrator/.backup.lock (runtime metadata).
Enhance network snapshot IP extraction to return the primary address with CIDR and handle token parsing/whitespace robustly, preferring IPv4 when available. Add unit tests covering IPv4/IPv6/CIDR cases and missing snapshots. Introduce a suppressPVEChecks flag for cluster restores to skip PVE-specific health checks, adjust network health options accordingly, and enrich UI messages with observed/original IP and reconnect host guidance. Update applyNetworkWithRollbackWithUI signature and return the constructed NetworkApplyNotCommittedError for richer reporting. Minor test call adjustment and backup lock timestamp update.
Replace live-updating countdown UI in CLI and TUI prompts with a single-line deadline display and simplified input handling. Prompts now show a human-readable deadline (HH:MM:SS) and total seconds, and use ReadLineWithContext directly instead of a ticker + goroutine/select loop to avoid issues on terminals that don't handle repeated carriage-return updates (e.g. IPMI/serial). Logging and timeout/cancel handling preserved; TUI text updated to include the deadline.
Implement automatic email recipient discovery for root@pam across Proxmox platforms. The Email notifier now tries pvesh (PVE API) first, falls back to legacy CLIs (pveum / proxmox-backup-manager), and finally parses user.cfg (/etc/pve/user.cfg or /etc/proxmox-backup/user.cfg). Added helper functions (redactEmail, runCombinedOutput, truncateForLog), new configurable paths and diagnostic limits, and improved debug logging with truncated diagnostics. Updated tests to cover pvesh and user.cfg fallbacks and adjusted existing tests. Documentation (CONFIGURATION and TROUBLESHOOTING) now describes auto-detection behavior and provides quick CLI checks. Minor update to internal/orchestrator/.backup.lock timestamp.
Update the go.mod toolchain directive from go1.25.6 to go1.25.7 to align with the latest Go 1.25 patch release.
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
Pull request overview
This PR syncs development branch changes to main, including infrastructure improvements, configuration management enhancements, better user experience for network operations, and expanded PBS collection capabilities.
Changes:
- Removed deprecated
BASE_DIRandCRON_*keys from backup.env (auto-detected at runtime) - Added granular PBS collection toggles for S3, ACME, metrics, traffic control, and network configs
- Improved network rollback UI with IP parsing that includes CIDR notation and better reconnection guidance
- Removed live countdown updates from CLI prompts to fix compatibility with IPMI/serial consoles
- Enhanced email recipient auto-detection with multi-strategy fallback (pvesh API → CLI → config file)
- Added issue logging and summary display for warnings/errors at run completion
- Improved PVE manifest logging with per-file status and actionable warnings
- Bumped Go toolchain from 1.25.6 to 1.25.7
Reviewed changes
Copilot reviewed 27 out of 28 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| internal/tui/wizard/install.go | Added unsetEnvValue function and removed BASE_DIR/CRON_* from install templates |
| internal/tui/wizard/install_test.go | Updated tests to verify BASE_DIR and CRON_* keys are removed |
| internal/config/upgrade.go | Added deprecated key pruning logic for config upgrades |
| internal/config/upgrade_test.go | Added tests for BASE_DIR and CRON_* pruning during upgrades |
| internal/config/templates/backup.env | Added new PBS collection toggle flags with documentation |
| internal/config/config.go | Added parsing for new PBS collection configuration options |
| internal/backup/collector.go | Added new PBS collection config fields to CollectorConfig |
| internal/backup/collector_pbs.go | Implemented granular PBS config collection with disableHint parameter |
| internal/backup/collector_pbs_extra_test.go | Updated test to include BackupPBSNetworkConfig flag |
| internal/backup/collector_pve.go | Enhanced manifest logging with per-file status and warnings for unconfigured features |
| internal/orchestrator/orchestrator.go | Applied new PBS collection config overrides to collector |
| internal/orchestrator/network_apply.go | Enhanced IP extraction to preserve CIDR notation for better rollback messaging |
| internal/orchestrator/network_apply_snapshot_test.go | Added comprehensive tests for IP extraction with CIDR |
| internal/orchestrator/network_apply_workflow_ui.go | Added suppressPVEChecks parameter for cluster recovery scenarios |
| internal/orchestrator/network_apply_preflight_rollback_test.go | Updated test call signature with suppressPVEChecks parameter |
| internal/orchestrator/restore_workflow_ui.go | Enhanced network rollback error messages with IP parsing and reconnection hints |
| internal/orchestrator/prompts_cli.go | Simplified countdown prompts to single-line display for better terminal compatibility |
| internal/orchestrator/restore_tui.go | Added deadline timestamp to countdown displays |
| internal/notify/email.go | Implemented multi-strategy recipient auto-detection with pvesh API primary, CLI fallback, and config file last resort |
| internal/notify/email_test.go | Added tests for all recipient detection strategies including fallbacks |
| internal/logging/logger.go | Added issue line capture and counter methods for end-of-run summaries |
| cmd/proxsave/main.go | Added warnings/errors summary display before final exit status |
| cmd/proxsave/install.go | Removed explicit BASE_DIR setting from install wizard |
| go.mod | Bumped toolchain to go1.25.7 |
| docs/TROUBLESHOOTING.md | Added recipient auto-detection troubleshooting guidance |
| docs/CONFIGURATION.md | Updated BASE_DIR and EMAIL_RECIPIENT documentation |
| docs/BACKUP_ENV_MAPPING.md | Documented new PBS collection flags |
| internal/orchestrator/.backup.lock | Lock file updated (should not be committed) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| pid=227499 | ||
| host=pve | ||
| time=2026-02-03T19:42:03+01:00 | ||
| time=2026-02-05T20:31:58+01:00 |
There was a problem hiding this comment.
This lock file should not be committed to the repository. Lock files are typically generated at runtime and should be ignored by version control. Consider adding .backup.lock to .gitignore and removing this file from the repository.
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |