Backing Up Greenplum to Unified Data Vault

You can back up Greenplum databases using the gpbackup utility with S3 plugin integration to store backups in Commvault Unified Data Vault.

Before You Begin

Supported Versions: - Greenplum Database Version 6.19.0 - Greenplum Database Version 6.27.1

Prerequisites:

  1. System Requirements:

    • Requires a Linux machine with Greenplum Database installed
    • Access to both Greenplum Database and the Commvault S3 endpoint
    • Greenplum Database user with backup privileges
  2. Greenplum Backup Utility:
    gpbackup and gprestore are Greenplum utilities designed for efficient, parallel backup and restore of Greenplum databases.

  3. Unified Data Vault Setup:

    Ensure that your infrastructure administrator has created an S3 endpoint.

    1. Create an Unified Data Vault.

    2. Get Unified Data Vault Keys.

  4. Configure S3 Plugin:

    Create an S3 configuration file (e.g., /home/gpadmin/s3_config.yaml) with the following settings:

    executablepath: /usr/local/greenplum-db/bin/gpbackup_s3_plugin
    options:
        bucket: your-s3-bucket-name
        region: ap-south-1
        access_key_id: ${AWS_ACCESS_KEY_ID}
        secret_access_key: ${AWS_SECRET_ACCESS_KEY}
        folder: greenplum-backup
    

    Security Note: Never hardcode AWS credentials in configuration files. Use environment variables or AWS IAM roles instead. Configuration Parameters

    Parameter Description Example
    bucket S3 bucket name for storing backups your-s3-bucket-name
    region AWS region where bucket is located ap-south-1
    access_key_id AWS access key ID ${AWS_ACCESS_KEY_ID}
    secret_access_key AWS secret access key ${AWS_SECRET_ACCESS_KEY}
    folder Folder path within the bucket greenplum-backup

Run Greenplum Backup

To create a backup of your Greenplum database:

gpbackup \
--dbname gpdb \
--backup-dir /tmp/backups \
--plugin-config /home/gpadmin/s3_config.yaml

Parameters:

  • --dbname: Name of the database to backup

  • --backup-dir: Local directory for temporary backup files

  • --plugin-config: Path to the S3 configuration file

List Greenplum Backups

To view available backups, check the S3 bucket directly or use Greenplum utilities to list backup timestamps.

Restore Greenplum Backups

To restore a Greenplum database from backup:

gprestore \
--timestamp <TIMESTAMP_FROM_BACKUP> \
--backup-dir /tmp/backups \
--plugin-config /home/gpadmin/s3_config.yaml \
--create-db \
--dbname gpdb

Parameters: - --timestamp: Backup timestamp to restore from

  • --backup-dir: Local directory for temporary restore files

  • --plugin-config: Path to the S3 configuration file

  • --create-db: Create the database if it doesn't exist

  • --dbname: Target database name for restore

×

Loading...