IBM PureData System for Analytics, Version 7.1

The nzhostrestore command

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.

Note: After you run nzhostrestore, the system reverts to the mirroring roles (that is, topology) it had when it was last online.

After you use the nzhostrestore command, you cannot run an incremental backup on the database; you must run a full backup first.

Syntax

The nzhostrestore command uses the following syntax:
nzhostrestore [-f] [-D DATA_DIR] [-catverok] FILE 
nzhostrestore -h

Inputs

The nzhostrestore command takes the following inputs:
Table 1. The nzhostrestore input options
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.

Options

The nzhostrestore command uses the following options:
Table 2. The nzhostrestore 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 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

The nzhostrestore command does the following:
Privileges required
You must specify a database user account that has Manage System privileges.
Common tasks
The nzhostrestore command pauses the system before it starts the restore.

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.

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.

For example, if you ran the nzhostrestore command and it found orphaned tables, you would see the following message:
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:



Feedback | Copyright IBM Corporation 2014 | Last updated: 2014-02-28