gp_restore
Note:Restores Greenplum databases that were backed up using gp_dump.
The gp_restore utility is deprecated and will be removed in a future release. Use gpcrondump and gpdbrestore to backup and restore Greenplum databases.
Synopsis
gp_restore --gp-k=timestamp_key -d database_name [-i] [-v]
[-a | -s] [-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
[gpadmin@sachi ~]$ gp_restore --help
gp_restore restores a Greenplum Database database from an archive created by gp_dump.
Usage:
gp_restore [OPTIONS]
General options:
-d, --dbname=NAME output database name
-i, --ignore-version proceed even when server version mismatches
-v, --verbose verbose mode. adds verbose information to the
per segment status files
--help show this help, then exit
--version output version information, then exit
Options controlling the output content:
-a, --data-only restore only the data, no schema
-s, --schema-only restore only the schema, no data
Connection options:
-h, --host=HOSTNAME database server host or socket directory
-p, --port=PORT database server port number
-U, --username=NAME connect as specified database user
-W, --password force password prompt (should happen automatically)
Greenplum Database specific options:
--gp-c use gunzip for in-line de-compression
--gp-d=BACKUPFILEDIR directory where backup files are located
--gp-i ignore error
--gp-k=KEY date time backup key from gp_backup run
--gp-r=REPORTFILEDIR directory where report file is placed
--gp-l=FILELOCATIONS backup files are on (p)rimaries only (default)
or (i)ndividual segdb (must be followed with a list of dbid's
where backups are located. For example: --gp-l=i[10,12,15]
[gpadmin@sachi ~]$
Examples
Restore an Greenplum database using backup files created by gp_dump:
gp_restore --gp-k=2005103112453 -d gpdb
Restore a single segment instance only (by noting the dbid of the segment instance):
gp_restore --gp-k=2005103112453 -d gpdb --gp-s=5