Script to backup and replicate database using ddboost in DR env

posted Aug 27, 2014, 9:31 AM by Sachchida Ojha   [ updated Aug 27, 2014, 9:36 AM ]
Backup database in DR env
gpcrondump -x <dbname> -z --ddboost --replicate --max-streams 50 –a

gpcrondump is a wrapper utility for gp_dump, which can be called directly or from a crontab entry.


gpcrondump -x database_name 
[-s schema | -t schema.table | -T schema.table] 
[-w dbid[,...]] [-u backup_directory] 
[-R post_dump_script] [-c | -o] [-z] [-r] [-f free_space_percent]
[-b] [-i] [-j | -k] [-g] [-G] [-C] [-d master_data_directory] 
[-B parallel_processes] [-a] [-q] 
[-y reportfile] [-l logfile_directory] [-D] 
{ [-E encoding] [--inserts | --column-inserts] [--oids]
[--no-owner | --use-set-session-authorization]
[--no-privileges] }

gpcrondump -?

gpcrondump -v

Restore the backup in the DR env
gpdbrestore -t 20120804040014 -v --ddboost -l /var/tmp –a

Note: -G will get all the global objects including roles and resource queues. –g will copy all the configuration files pg_hba.conf, postgresql.conf and pg_ident.conf (if there).

gp_restore=>Restores Greenplum databases that were backed up using gp_dump.


gp_restore --gp-k=timestamp_key -d database_name [-i] [-v] [-a |
-s] [-c] [-h hostname] [-p port] [-U username] [-W] [--gp-c]
[--gp-i] [--gp-d=directoryname] [--gp-r=reportfile] [--gp-l=dbid
[, ...]]

gp_restore -? | -h | --help

gp_restore --version