Performing Greenplum Table-level Restores

Commvault provides a command-line utility that you can use to perform the following Greenplum database restore operations:

  • Table-level restores using any of the following options:

    • To the latest backup

    • A point in time

    • To a different database

  • Point-in-time restores

  • Restores to a new database (out-of-place restores)

Run the utility from the Greenplum master host from the Linux command line.

Before You Begin

  • Perform a Greenplum backup from the CommCell Console. For more information, see Performing Greenplum Backups.

  • Get the Greenplum admin credentials, for example' "gpadmin".

  • Set the $GPHOME env variable in the gpadmin user environment

  • Verify that the Greenplum admin user (gpadmin) is part of the Commvault install group.

  • Verify that Python is available in the Greenplum environment.

  • To prevent the SSH session idle timeout during the restore operation, on the segment node (sshds) and master node (ssh client), go to the /etc/ssh/sshd_config file, and set the idle timeout value for the following parameters.

    ClientAliveCountMax

    ClientAliveInterval

Procedure

  1. Run the utility from the gpadmin user session. On the command line, type the following command:

    su - gpadmin
  2. Change directory to the <Commvault Install Base location>/CVGreenplumBkpRstUtility.

  3. On the command line, type the following command to perform your restore.

    For information on the supported parameters, see Commvault Greenplum Restore Utility Man Page.

    ./CVMain.sh

Results

The software performs the restore operation. You can monitor the job progress fromm the CommCell Console. For more information, see Job Controller Overview.

Examples

In all the examples, dbgreenplum represents the Commvault source client and dbgp represents the Greenplum instance name that is configured in the CommCell Console.

Perform a Table-level Restore to the Latest Backup

Restore the public.book_words and public.book_punct tables to the books database. In this example, the parameters are on the command line.

./CVMain.sh -s dbgreenplum -i dbgp  -r "-T public.book_words,public.book_punct --truncate  -s books  --noanalyze"

Perform a Table-level Restore to a Point in Time

Restore the public.book_words and public.book_punct tables to the books database to a point in time. In this example, the parameters are on the command line.

./CVMain.sh -s dbgreenplum -i dbgp -r "-T public.book_words,public.book_punct --truncate  -t 0180206203200 --noanalyze"

Perform an Out-of-Place Table-Level Restore

Restore the public.book_words and public.book_punct tables to the redirect_books database to a point in time. In this example, the parameters are on the command line.

./CVMain.sh -s dbgreenplum -i dbgp -r  "-T public.book_words,public.book_punct -t 0180206203200 --redirect books_restored_tables"

Perform a Database Restore to the Latest Backup

Restore the books database. In this example, the parameters are on the command line.

./CVMain.sh -s dbgreenplum -i dbgp  -r "-e -s books"

Perform a Database Restore to a Point in Time

Restore the books database to a point in time. In this example, the parameters are on the command line.

./CVMain.sh -s dbgreenplum -i dbgp -r "-T public.book_words,public.book_punct --truncate  -t 0180206203200 --noanalyze"

Perform an Out-of-Place Database Restore

Restore the books database to the redirect_books database. In this example, the parameters are on the command line.

./CVMain.sh -s dbgreenplum -i dbgp -r  "-e -t 0180206203200 --redirect books_restored"
×

Loading...