diff --git a/.dbbackup.conf b/.dbbackup.conf new file mode 100644 index 0000000..33066ab --- /dev/null +++ b/.dbbackup.conf @@ -0,0 +1,25 @@ +# dbbackup configuration +# This file is auto-generated. Edit with care. + +[database] +type = postgres +host = 172.20.0.3 +port = 5432 +user = postgres +database = postgres +ssl_mode = prefer + +[backup] +backup_dir = /root/source/dbbackup/tmp +compression = 6 +jobs = 4 +dump_jobs = 2 + +[performance] +cpu_workload = balanced +max_cores = 8 + +[security] +retention_days = 30 +min_backups = 5 +max_retries = 3 diff --git a/internal/tui/menu.go b/internal/tui/menu.go index 86a7e07..8e3ce95 100755 --- a/internal/tui/menu.go +++ b/internal/tui/menu.go @@ -345,6 +345,11 @@ func (m *MenuModel) handleClusterBackup() (tea.Model, tea.Cmd) { m.message = errorStyle.Render("❌ Cluster backup is available only for PostgreSQL targets") return m, nil } + // Skip confirmation in auto-confirm mode + if m.config.TUIAutoConfirm { + executor := NewBackupExecution(m.config, m.logger, m, m.ctx, "cluster", "", 0) + return executor, executor.Init() + } confirm := NewConfirmationModelWithAction(m.config, m.logger, m, "🗄️ Cluster Backup", "This will backup ALL databases in the cluster. Continue?", @@ -352,7 +357,7 @@ func (m *MenuModel) handleClusterBackup() (tea.Model, tea.Cmd) { executor := NewBackupExecution(m.config, m.logger, m, m.ctx, "cluster", "", 0) return executor, executor.Init() }) - return confirm, nil + return confirm, confirm.Init() } // handleViewOperations shows active operations