Backing Up Databases with Veritas NetBackup
- About NetBackup Software
- Configuring Greenplum Database Hosts for NetBackup
- Performing a Back Up or Restore with NetBackup
Parent topic: Parallel Backup with gpcrondump and gpdbrestore
NetBackup includes the following server and client software:
- The NetBackup master server manages NetBackup backups, archives, and restores. The master server is responsible for media and device selection for NetBackup.
- NetBackup Media servers are the NetBackup device hosts that provide additional storage by allowing NetBackup to use the storage devices that are attached to them.
See the Veritas NetBackup Getting Started Guide for information about NetBackup.
See the Release Notes for information about compatible NetBackup versions for this release of Tanzu Greenplum.
Limitations
- NetBackup is not compatible with DDBoost. Both NetBackup and DDBoost cannot be used in a single back up or restore operation.
- For incremental back up sets, a full backup and associated incremental backups, the backup set must be on a single device. For example, a backup set must all be on a NetBackup system. The backup set cannot have some backups on a NetBackup system and others on the local file system or a Data Domain system.
You install and configure NetBackup client software on the Greenplum Database master host and all segment hosts. The NetBackup client software must be able to communicate with the NetBackup server software.
Install the NetBackup client software on Greenplum Database hosts. See the NetBackup installation documentation for information on installing NetBackup clients on UNIX systems.
Set parameters in the NetBackup configuration file
/usr/openv/netbackup/bp.conf
on the Greenplum Database master and segment hosts. Set the following parameters on each Greenplum Database host.See the Veritas NetBackup Administrator’s Guide for information about the bp.conf file.
Set the
LD_LIBRARY_PATH
environment variable for Greenplum Database hosts to use NetBackup client. Greenplum Database installs NetBackup SDK library files that are used with the NetBackup client. To configure Greenplum Database to use the library files that correspond to the version of the NetBackup client that is installed on the hosts, add the following line to the file$GPHOME/greenplum_path.sh
:Replace the NN with the NetBackup client version that is installed on the host (for example, use 77 for NetBackup 7.7.x).
The
LD_LIBRARY_PATH
line should be added before this line in$GPHOME/greenplum_path.sh
:export LD_LIBRARY_PATH
Execute this command to remove the current
LD_LIBRARY_PATH
value:Execute this command to update the environment variables for Greenplum Database:
source $GPHOME/greenplum_path.sh
See the Veritas NetBackup Administrator’s Guide for information about configuring NetBackup servers.
Ensure that the Greenplum Database hosts are listed as NetBackup clients for the NetBackup server.
In the NetBackup Administration Console, the information for the NetBackup clients, Media Server, and Master Server is in the NetBackup Management node within the Host Properties node.
-
In the NetBackup Administration Console, the information for NetBackup storage units is in NetBackup Management node within the Storage node.
Configure a NetBackup backup policy and schedule within the policy.
In the NetBackup Administration Console, the Policy node below the Master Server node is where you create a policy and a schedule for the policy.
In the Policy Attributes tab, these values are required for Greenplum Database:
The value in the Policy type field must be DataStore
The value in the Policy storage field is the storage unit created in the previous step.
The value in Limit jobs per policy field must be at least 3.
In the Policy Schedules tab, create a NetBackup schedule for the policy.
Configuring NetBackup for Greenplum Database
See the Veritas NetBackup Administrator’s Guide for information about configuring NetBackup servers.
Configure a NetBackup storage unit. The storage unit must be configured to point to a writable disk location.
In the NetBackup Administration Console, the information for NetBackup storage units is in NetBackup Management node within the Storage node.
Configure a NetBackup backup policy and schedule within the policy.
In the NetBackup Administration Console, the Policy node below the Master Server node is where you create a policy and a schedule for the policy.
In the Policy Attributes tab, these values are required for Greenplum Database:
The value in the Policy storage field is the storage unit created in the previous step.
The value in Limit jobs per policy field must be at least 3.
In the Policy Schedules tab, create a NetBackup schedule for the policy.
The Greenplum Database gpcrondump
and utilities support options to back up or restore data to a NetBackup storage unit. When performing a back up, Greenplum Database transfers data files directly to the NetBackup storage unit. No backup data files are created on the Greenplum Database hosts. The backup metadata files are both stored on the hosts and backed up to the NetBackup storage unit.
When performing a restore, the files are retrieved from the NetBackup server, and then restored.
Following are the gpcrondump
utility options for NetBackup:
The gpdbrestore
utility provides the following options for NetBackup:
--netbackup-service-host netbackup\_master\_server
--netbackup-block-size size (optional)
Note: When performing a restore operation from NetBackup, you must specify the backup timestamp with the gpdbrestore
utility -t
option.
The policy name and schedule name are defined on the NetBackup master server. See Configuring NetBackup for Greenplum Database for information about policy name and schedule name. See the Greenplum Database Utility Guide for information about the Greenplum Database utilities.
Note: You must run the gpcrondump
or gpdbrestore
command during a time window defined for the NetBackup schedule.
During a back up or restore operation, a separate NetBackup job is created for the following types of Greenplum Database data:
- Segment data for each segment instance
- C database data
- Metadata
- Post data for the master
- State files Global objects (
gpcrondump -G
option) - Configuration files for master and segments (
gpcrondump -g
option) - Report files (
gpcrondump -h
option)
In the NetBackup Administration Console, the Activity Monitor lists NetBackup jobs. For each job, the job detail displays Greenplum Database backup information.
Note: When backing up or restoring a large amount of data, set the NetBackup CLIENT_READ_TIMEOUT
option to a value that is at least twice the expected duration of the operation (in seconds). The CLIENT_READ_TIMEOUT
default value is seconds (5 minutes).
For example, if a backup takes 3 hours, set the CLIENT_READ_TIMEOUT
to 21600
(2 x 3 x 60 x 60). You can use the NetBackup nbgetconfig
and nbsetconfig
commands on the NetBackup server to view and change the option value.
For information about CLIENT_READ_TIMEOUT
and the nbgetconfig
, and nbsetconfig
commands, see the NetBackup documentation.
Example NetBackup Back Up and Restore Commands
This gpcrondump
command backs up the database customer and specifies a NetBackup policy and schedule that are defined on the NetBackup master server nbu_server1
. A block size of 1024 bytes is used to transfer data to the NetBackup server.
gpdbrestore -t 20170530090000 -e --netbackup-service-host=nbu_server1