## Error Message Improvements (Phase 1) - ✅ Cluster backup: Added database type context to error messages - ✅ Rate limiting: Show specific host and wait time in errors - ✅ Connection failures: Added troubleshooting steps (3-point checklist) - ✅ Encryption errors: Include backup location in failure messages - ✅ Archive not found: Suggest cloud:// URI for remote backups - ✅ Decryption: Hint about wrong key verification - ✅ Backup directory: Include permission hints and --backup-dir suggestion - ✅ Backup execution: Show database name and diagnostic checklist - ✅ Incremental: Better base backup path guidance - ✅ File verification: Indicate silent command failure possibility ## Progress Indicator Enhancements (Phase 2) - ✅ ETA calculations: Real-time estimation based on transfer speed - ✅ Speed formatting: formatSpeed() helper (B/KB/MB/GB per second) - ✅ Byte formatting: formatBytes() with proper unit scaling - ✅ Duration display: Improved to show Xm Ys format vs decimal - ✅ Progress updates: Show [%] bytes/total (speed, ETA: time) format ## Performance Optimization (Phase 3) - ✅ Buffer sizes: Increased stderr read buffers from 4KB to 64KB - ✅ Scanner buffers: 64KB initial, 1MB max for command output - ✅ I/O throughput: Better buffer alignment for streaming operations ## Code Cleanup (Phase 4) - ✅ TODO comments: Converted to descriptive comments - ✅ Method calls: Fixed GetDatabaseType() -> DisplayDatabaseType() - ✅ Build verification: All changes compile successfully ## Summary Time: ~1.5h (2-4h estimated) Changed: 4 files (cmd/backup_impl.go, cmd/restore.go, internal/backup/engine.go, internal/progress/detailed.go) Impact: Better UX, clearer errors, faster I/O, cleaner code
113 lines
5.8 KiB
Modula-2
Executable File
113 lines
5.8 KiB
Modula-2
Executable File
module dbbackup
|
|
|
|
go 1.24.0
|
|
|
|
toolchain go1.24.9
|
|
|
|
require (
|
|
github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2
|
|
github.com/charmbracelet/bubbles v0.21.0
|
|
github.com/charmbracelet/bubbletea v1.3.10
|
|
github.com/charmbracelet/lipgloss v1.1.0
|
|
github.com/go-sql-driver/mysql v1.9.3
|
|
github.com/jackc/pgx/v5 v5.7.6
|
|
github.com/sirupsen/logrus v1.9.3
|
|
github.com/spf13/cobra v1.10.1
|
|
github.com/spf13/pflag v1.0.9
|
|
)
|
|
|
|
require (
|
|
cel.dev/expr v0.24.0 // indirect
|
|
cloud.google.com/go v0.121.6 // indirect
|
|
cloud.google.com/go/auth v0.17.0 // indirect
|
|
cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect
|
|
cloud.google.com/go/compute/metadata v0.9.0 // indirect
|
|
cloud.google.com/go/iam v1.5.2 // indirect
|
|
cloud.google.com/go/monitoring v1.24.2 // indirect
|
|
cloud.google.com/go/storage v1.57.2 // indirect
|
|
filippo.io/edwards25519 v1.1.0 // indirect
|
|
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.20.0 // indirect
|
|
github.com/Azure/azure-sdk-for-go/sdk/internal v1.11.2 // indirect
|
|
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.3 // indirect
|
|
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.29.0 // indirect
|
|
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.53.0 // indirect
|
|
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.53.0 // indirect
|
|
github.com/aws/aws-sdk-go-v2 v1.40.0 // indirect
|
|
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.3 // indirect
|
|
github.com/aws/aws-sdk-go-v2/config v1.32.2 // indirect
|
|
github.com/aws/aws-sdk-go-v2/credentials v1.19.2 // indirect
|
|
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.14 // indirect
|
|
github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.20.12 // indirect
|
|
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.14 // indirect
|
|
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.14 // indirect
|
|
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4 // indirect
|
|
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.14 // indirect
|
|
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.3 // indirect
|
|
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.5 // indirect
|
|
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.14 // indirect
|
|
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.14 // indirect
|
|
github.com/aws/aws-sdk-go-v2/service/s3 v1.92.1 // indirect
|
|
github.com/aws/aws-sdk-go-v2/service/signin v1.0.2 // indirect
|
|
github.com/aws/aws-sdk-go-v2/service/sso v1.30.5 // indirect
|
|
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.10 // indirect
|
|
github.com/aws/aws-sdk-go-v2/service/sts v1.41.2 // indirect
|
|
github.com/aws/smithy-go v1.23.2 // indirect
|
|
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
|
|
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
|
github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc // indirect
|
|
github.com/charmbracelet/x/ansi v0.10.1 // indirect
|
|
github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd // indirect
|
|
github.com/charmbracelet/x/term v0.2.1 // indirect
|
|
github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443 // indirect
|
|
github.com/creack/pty v1.1.17 // indirect
|
|
github.com/envoyproxy/go-control-plane/envoy v1.32.4 // indirect
|
|
github.com/envoyproxy/protoc-gen-validate v1.2.1 // indirect
|
|
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
|
|
github.com/felixge/httpsnoop v1.0.4 // indirect
|
|
github.com/go-jose/go-jose/v4 v4.1.2 // indirect
|
|
github.com/go-logr/logr v1.4.3 // indirect
|
|
github.com/go-logr/stdr v1.2.2 // indirect
|
|
github.com/google/s2a-go v0.1.9 // indirect
|
|
github.com/google/uuid v1.6.0 // indirect
|
|
github.com/googleapis/enterprise-certificate-proxy v0.3.7 // indirect
|
|
github.com/googleapis/gax-go/v2 v2.15.0 // indirect
|
|
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
|
github.com/jackc/pgpassfile v1.0.0 // indirect
|
|
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
|
|
github.com/jackc/puddle/v2 v2.2.2 // indirect
|
|
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
|
|
github.com/mattn/go-isatty v0.0.20 // indirect
|
|
github.com/mattn/go-localereader v0.0.1 // indirect
|
|
github.com/mattn/go-runewidth v0.0.16 // indirect
|
|
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
|
|
github.com/muesli/cancelreader v0.2.2 // indirect
|
|
github.com/muesli/termenv v0.16.0 // indirect
|
|
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
|
|
github.com/rivo/uniseg v0.4.7 // indirect
|
|
github.com/spiffe/go-spiffe/v2 v2.5.0 // indirect
|
|
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
|
|
github.com/zeebo/errs v1.4.0 // indirect
|
|
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
|
|
go.opentelemetry.io/contrib/detectors/gcp v1.36.0 // indirect
|
|
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 // indirect
|
|
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect
|
|
go.opentelemetry.io/otel v1.37.0 // indirect
|
|
go.opentelemetry.io/otel/metric v1.37.0 // indirect
|
|
go.opentelemetry.io/otel/sdk v1.37.0 // indirect
|
|
go.opentelemetry.io/otel/sdk/metric v1.37.0 // indirect
|
|
go.opentelemetry.io/otel/trace v1.37.0 // indirect
|
|
golang.org/x/crypto v0.43.0 // indirect
|
|
golang.org/x/net v0.46.0 // indirect
|
|
golang.org/x/oauth2 v0.33.0 // indirect
|
|
golang.org/x/sync v0.18.0 // indirect
|
|
golang.org/x/sys v0.38.0 // indirect
|
|
golang.org/x/text v0.30.0 // indirect
|
|
golang.org/x/time v0.14.0 // indirect
|
|
google.golang.org/api v0.256.0 // indirect
|
|
google.golang.org/genproto v0.0.0-20250603155806-513f23925822 // indirect
|
|
google.golang.org/genproto/googleapis/api v0.0.0-20250818200422-3122310a409c // indirect
|
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20251103181224-f26f9409b101 // indirect
|
|
google.golang.org/grpc v1.76.0 // indirect
|
|
google.golang.org/protobuf v1.36.10 // indirect
|
|
)
|