Add gpBackMan — a backup management utility for Apache Cloudberry (Incubating) Backup.#79
Open
woblerr wants to merge 10 commits intoapache:mainfrom
Open
Add gpBackMan — a backup management utility for Apache Cloudberry (Incubating) Backup.#79woblerr wants to merge 10 commits intoapache:mainfrom
woblerr wants to merge 10 commits intoapache:mainfrom
Conversation
Integrate gpbackman (https://github.com/woblerr/gpbackman) — a CLI utility for managing gpbackup backups — into the cloudberry-backup repo. YAML functionality (history-migrate, converters, utils_file) is not ported. Key changes: - Add gpbackman.go entry point with //go:build gpbackman tag - Create gpbackman/cmd/, gpbackman/gpbckpconfig/, gpbackman/textmsg/ - Migrate imports: greenplum-db/* → apache/cloudberry-* - Remove converter layer — use history.BackupConfig directly - Extract 11 BackupConfig methods into standalone functions (helpers.go) - Replace go-pretty/v6 with olekukonko/tablewriter - Add gpbackman to all Makefile targets (build/install/clean/package) - Version via ldflags: -X gpbackman/cmd.version - Rewrite unit tests from stdlib testing to Ginkgo/Gomega CLI subcommands: backup-info, backup-delete, backup-clean, history-clean, report-info.
- Replace searchFilter() with utils.Exists() in gpbckpconfig/helpers.go - Remove searchFilter() from gpbckpconfig/utils.go and its test - Replace getCurrentTimestamp() with history.CurrentTimestamp() in cmd/backup_delete.go - Remove getCurrentTimestamp() from cmd/wrappers.go and its test
Also add vscode to gitignore.
Member
|
Hi @woblerr thanks for your great work! A license question needs your confirmation here: do you still want to keep these files under the original MIT license, or adopt the Apache license? (MIT files are allowed to be introduced in ASF projects.) Once you confirm, I can help with it. |
Author
|
@tuhaihe The original gpbackman project will remain under MIT. Is it acceptable for you? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds gpBackMan, a utility for managing backups created by gpbackup. The tool provides an open-source alternative to the proprietary
gpbackup_manager, addressing the need discussed in apache/cloudberry#1555gpBackMan is based on the original gpbackman project (woblerr/gpbackman#39) and has been adapted for integration into the cloudberry-backup repository.
Motivation
The Apache Cloudberry community has expressed interest in having a backup management tool similar to gpbackup_manager, which is proprietary and not available in the open-source offering. gpBackMan fills this gap by providing essential backup management capabilities that work with the
gpbackup_history.dbSQLite history database format.Features
gpBackMan provides the following functionality:
backup-info— display information about existing backups;report-info— display the backup report for a specific backup;backup-delete— delete a specific existing backup from local storage or using storage plugins;backup-clean— delete all existing backups older than (or newer than) a specified time condition;history-clean— clean deleted backups from the history database;Both local storage and storage plugin-based backups are supported.
Related links
Discussion: apache/cloudberry#1555 — Availability of GPBackup_Manager in CB2.0
Issue: woblerr/gpbackman#39 — Support for Apache Cloudberry
Original project: gpbackman