Rebuilding a New Greenplum System From Backup

Rebuilding a New Greenplum System From Backup

In some cases, you may need to rebuild your entire Greenplum Database system from a set of backup files. You can either rebuild on the same array of machines as your original system, or on a different array. The only requirement is that the Greenplum Database system you are rebuilding has the exact same number of segment instances as the system that was backed up using gp_dump.

If you need to rebuild your system on a completely different segment configuration, reinitialize a new array using gpinitsystem, then do a non-parallel restore.

To rebuild your Greenplum array

1.First, you must have a backup of your data. It is good practice to make backups of your databases on a regular basis.

2.Make sure the Greenplum Database software is installed and configured on all hosts in the array.

3.Use the gprebuildsystem utility to reconstruct your Greenplum Database system from the catalog backup file created by gp_dump. For example:

$ gprebuildsystem -f gp_catalog_0_1_2012103112453 -d /tmp

If rebuilding the array on a different set of hosts than the system that was originally backed up, use the -c option. The utility will then prompt you for the new segment host configuration information. For example:

$ gprebuildsystem -f gp_catalog_0_1_2012103112453 -d /tmp -c

4.You should now have your reconfigured Greenplum Database system up and running, and ready to restore your data from your backup files.

See “Restoring a Database with gp_restore