diff --git a/bin/README.md b/bin/README.md index 6faaff3..0c98659 100644 --- a/bin/README.md +++ b/bin/README.md @@ -4,8 +4,8 @@ This directory contains pre-compiled binaries for the DB Backup Tool across mult ## Build Information - **Version**: 1.1.0 -- **Build Time**: 2025-11-05_13:46:28_UTC -- **Git Commit**: 07b3c74 +- **Build Time**: 2025-11-05_13:55:03_UTC +- **Git Commit**: e2596c4 ## Recent Updates (v1.1.0) - ✅ Fixed TUI progress display with line-by-line output diff --git a/bin/dbbackup_darwin_amd64 b/bin/dbbackup_darwin_amd64 index 655b828..6abd232 100755 Binary files a/bin/dbbackup_darwin_amd64 and b/bin/dbbackup_darwin_amd64 differ diff --git a/bin/dbbackup_darwin_arm64 b/bin/dbbackup_darwin_arm64 index 0710ca1..759bea9 100755 Binary files a/bin/dbbackup_darwin_arm64 and b/bin/dbbackup_darwin_arm64 differ diff --git a/bin/dbbackup_freebsd_amd64 b/bin/dbbackup_freebsd_amd64 index dc3ee39..554a483 100755 Binary files a/bin/dbbackup_freebsd_amd64 and b/bin/dbbackup_freebsd_amd64 differ diff --git a/bin/dbbackup_linux_amd64 b/bin/dbbackup_linux_amd64 index 79ba549..845a779 100755 Binary files a/bin/dbbackup_linux_amd64 and b/bin/dbbackup_linux_amd64 differ diff --git a/bin/dbbackup_linux_arm64 b/bin/dbbackup_linux_arm64 index 09eb54f..3f6b7f3 100755 Binary files a/bin/dbbackup_linux_arm64 and b/bin/dbbackup_linux_arm64 differ diff --git a/bin/dbbackup_linux_arm_armv7 b/bin/dbbackup_linux_arm_armv7 index 1788b6a..0683a7c 100755 Binary files a/bin/dbbackup_linux_arm_armv7 and b/bin/dbbackup_linux_arm_armv7 differ diff --git a/bin/dbbackup_netbsd_amd64 b/bin/dbbackup_netbsd_amd64 index 236fb82..fb9f9e6 100755 Binary files a/bin/dbbackup_netbsd_amd64 and b/bin/dbbackup_netbsd_amd64 differ diff --git a/bin/dbbackup_openbsd_amd64 b/bin/dbbackup_openbsd_amd64 index 4c5ba42..6b3258e 100755 Binary files a/bin/dbbackup_openbsd_amd64 and b/bin/dbbackup_openbsd_amd64 differ diff --git a/bin/dbbackup_windows_amd64.exe b/bin/dbbackup_windows_amd64.exe index 9bfe63d..7a0b4d2 100755 Binary files a/bin/dbbackup_windows_amd64.exe and b/bin/dbbackup_windows_amd64.exe differ diff --git a/bin/dbbackup_windows_arm64.exe b/bin/dbbackup_windows_arm64.exe index c0b3a39..f3d41f7 100755 Binary files a/bin/dbbackup_windows_arm64.exe and b/bin/dbbackup_windows_arm64.exe differ diff --git a/dbbackup b/dbbackup index 79ba549..845a779 100755 Binary files a/dbbackup and b/dbbackup differ diff --git a/internal/backup/engine.go b/internal/backup/engine.go index 061dfb0..6035276 100644 --- a/internal/backup/engine.go +++ b/internal/backup/engine.go @@ -62,6 +62,11 @@ func NewWithProgress(cfg *config.Config, log logger.Logger, db database.Database // NewSilent creates a new backup engine in silent mode (for TUI) func NewSilent(cfg *config.Config, log logger.Logger, db database.Database, progressIndicator progress.Indicator) *Engine { + // If no indicator provided, use null indicator (no output) + if progressIndicator == nil { + progressIndicator = progress.NewNullIndicator() + } + detailedReporter := progress.NewDetailedReporter(progressIndicator, &loggerAdapter{logger: log}) return &Engine{ @@ -278,9 +283,16 @@ func (e *Engine) BackupCluster(ctx context.Context) error { } } - // Use a quiet progress indicator to avoid duplicate messages - quietProgress := progress.NewQuietLineByLine() - quietProgress.Start("Starting cluster backup (all databases)") + // Use appropriate progress indicator based on silent mode + var quietProgress progress.Indicator + if e.silent { + // In silent mode (TUI), use null indicator - no stdout output at all + quietProgress = progress.NewNullIndicator() + } else { + // In CLI mode, use quiet line-by-line output + quietProgress = progress.NewQuietLineByLine() + quietProgress.Start("Starting cluster backup (all databases)") + } // Ensure backup directory exists if err := os.MkdirAll(e.cfg.BackupDir, 0755); err != nil { diff --git a/internal/progress/progress.go b/internal/progress/progress.go index 22f8562..b68b760 100644 --- a/internal/progress/progress.go +++ b/internal/progress/progress.go @@ -395,4 +395,18 @@ func NewIndicator(interactive bool, indicatorType string) Indicator { default: return NewLineByLine() // Default to line-by-line for better compatibility } -} \ No newline at end of file +} + +// NullIndicator is a no-op indicator that produces no output (for TUI mode) +type NullIndicator struct{} + +// NewNullIndicator creates an indicator that does nothing +func NewNullIndicator() *NullIndicator { + return &NullIndicator{} +} + +func (n *NullIndicator) Start(message string) {} +func (n *NullIndicator) Update(message string) {} +func (n *NullIndicator) Complete(message string) {} +func (n *NullIndicator) Fail(message string) {} +func (n *NullIndicator) Stop() {} \ No newline at end of file