Sign inSign up

woblerr/gpbackman

By woblerr

•Updated about 1 month ago

Manage backups created by gpbackup on Greenplum (and its forks) clusters.

Image
Databases & storage
0

4.8K

woblerr/gpbackman repository overview

⁠gpBackMan

Actions Status Coverage Status Go Report Card

gpBackMan is designed to manage backups created by gpbackup⁠ on Greenplum clusters⁠.

The utility works with both history database formats: gpbackup_history.yaml file format (before gpbackup 1.29.0) and gpbackup_history.db SQLite format (starting from gpbackup 1.29.0).

gpBackMan provides the following features:

  • display information about backups;
  • display the backup report for existing backups;
  • delete existing backups from local storage or using storage plugins (for example, S3 Storage Plugin⁠);
  • delete all existing backups from local storage or using storage plugins older than the specified time condition;
  • clean failed and deleted backups from the history database;
  • migrate history database from gpbackup_history.yaml format to gpbackup_history.db SQLite format.

⁠Commands

⁠Introduction

Available commands and global options:

./gpbackman --help
gpBackMan - utility for managing backups created by gpbackup

Usage:
  gpbackman [command]

Available Commands:
  backup-clean    Delete all existing backups older than the specified time condition
  backup-delete   Delete a specific existing backup
  backup-info     Display information about backups
  completion      Generate the autocompletion script for the specified shell
  help            Help about any command
  history-clean   Clean failed and deleted backups from the history database
  history-migrate Migrate history database
  report-info     Display the report for a specific backup

Flags:
  -h, --help                       help for gpbackman
      --history-db string          full path to the gpbackup_history.db file
      --history-file stringArray   full path to the gpbackup_history.yaml file, could be specified multiple times
      --log-file string            full path to log file directory, if not specified, the log file will be created in the $HOME/gpAdminLogs directory
      --log-level-console string   level for console logging (error, info, debug, verbose) (default "info")
      --log-level-file string      level for file logging (error, info, debug, verbose) (default "info")
  -v, --version                    version for gpbackman

Use "gpbackman [command] --help" for more information about a command.
⁠Detail info about commands

Description of each command:

⁠Getting Started

⁠Building and running
git clone https://github.com/woblerr/gpbackman.git
cd gpbackman
make build
./gpbackman <flags>
⁠Running as docker container

Environment variables supported by this image:

  • TZ - container's time zone, default Etc/UTC;
  • GPBACKMAN_USER - non-root user name for execution of the command, default gpbackman;
  • GPBACKMAN_UID - UID of internal ${GPBACKMAN_USER} user, default 1001;
  • GPBACKMAN_GID - GID of internal ${GPBACKMAN_USER} user, default 1001.
⁠Build container
make docker

or manual:

docker build  -f Dockerfile  -t gpbackman .
⁠Run container
docker run \
  --name gpbackman \
  -v /data/master/gpseg-1/gpbackup_history.db:/data/master/gpseg-1/gpbackup_history.db
  gpbackman \
  gpbackman backup-info \
  --history-db /data/master/gpseg-1/gpbackup_history.db
⁠Running tests

Run the unit tests:

make test

Run the end-to-end tests:

make test-e2e

Tag summary

Content type

Image

Digest

sha256:509961623…

Size

47.4 MB

Last updated

about 1 month ago

docker pull woblerr/gpbackman