The nzhostrestore command
Use the nzhostrestore command to restore your data directory and metadata.
The nzbackup and nzrestore commands also back up the system catalog and host data, but in situations where a Netezza Performance Server 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.
Syntax
nzhostrestore [-f] [-D DATA_DIR] [-catverok] FILE
nzhostrestore -h
Inputs
Input | Description |
---|---|
FILE | Specifies the archive file that was 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 Performance Server data directory to restore. The default is the data directory (NZ_DATA_DIR), which is usually /nz/data. |
Options
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: Unable to determine catalog version of data directory at /nz/data.1.0, hence exiting. If you are sure that catalog versions of current and that of the archived data directory are same, use the command-line switch -catverok to skip this check. Use caution with this switch; if you are not sure that the catalog versions are the same, do not bypass the checks. Contact Netezza Performance Server 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.Restore host data archived Thu May 25 11:24:58 EDT 2006? (y/n) [n] Warning: The restore will now rollback spu data to Thu May 25 11:24:58 EDT 2006. This operation cannot be undone. Ok to proceed? (y/n) [n] |
Description
- Privileges required
- You must specify a database user account that has Manage System privileges.
- Common tasks
- The nzhostrestore command stops the system, after confirmation from the user
(unless -f is
specified).
For more information about SPU roles, see Hardware roles.
Notes
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.
Usage
The following provides sample usage:
- To restore the default data directory, enter:
nzhostrestore /home/host/backup.tar.gz