Use the nzhostrestore command to restore your IBM® Netezza® data directory and metadata.
The nzbackup and nzrestore commands also back up the system catalog and host data, but in situations where a Netezza host server fails but the SPUs and their data are still intact, you can use the nzhostrestore command to quickly restore the catalog data without reinitializing the system and restoring all of the databases. For more information, see Host backup and restore.
After you use the nzhostrestore command, you cannot run an incremental backup on the database; you must run a full backup first.
nzhostrestore [-f] [-D DATA_DIR] [-catverok] FILE
nzhostrestore -h
Input | Description |
---|---|
FILE | Specifies the archive file that is created by the nzhostbackup command that you want to restore. |
nzhostrestore -h | Displays online help for this command. |
nzhostrestore -D DATA_DIR | Specifies the Netezza data directory to restore. The default is the data directory (NZ_DATA_DIR), which is usually /nz/data. |
Option | Description |
---|---|
-catverok | Skips the catalog verification checks. By default, the command
checks the catalog version of the current /nz/data directory
and the archived data directory. If the catalog versions are not the
same, or if the command cannot detect the catalog version of the current
data directory, the command exits with an error message similar to
the following message:
Use caution with this switch; if you are not sure that the catalog versions are the same, do not bypass the checks. Contact Netezza Support for assistance. |
-D data_dir | Specifies the data directory to restore (default /nz/data). |
-f | Specifies force, which causes the command to accept the defaults
for prompts and confirmation requests. The prompts displays at the
beginning and end of the program.
|
After a restoration, any SPUs that previously had a role other than active, spare, or failed are assigned to the role mismatched. The previous roles include assigned, inactive, or mismatched.
For more information about SPU roles, see Hardware roles.
If tables are created after the host backup, the nzhostrestore command marks these tables as “orphaned” on the SPUs. They are inaccessible and consume disk space. The nzhostrestore command checks for these orphan tables and creates a script that you can use to drop orphaned user tables.
Checking for orphaned SPU tables...
WARNING: found 2 orphaned SPU table(s).
Run ‘sh /tmp/nz_spu_orphans.18662.sh’ after the restore has completed
and the system is Online to remove the orphaned table(s).
To drop the orphan tables, run the script /tmp/nz_spu_orphans.18662.sh.
The following provides sample usage:
nzhostrestore /home/host/backup.tar.gz