The nzhostbackup command
Use the nzhostbackup command to back up the data directory and system catalog on the host.
In the rare situations when a Netezza Performance Server host server or disk fails, but the SPUs and their data are still intact, you can restore the /nz/data directory (or whatever directory you use for the Netezza Performance Server data directory) from the host backup without the additional time to restore all of the databases. For more information, see Host backup and restore.
- Pause the system.
- Set the NZ_USER and NZ_PASSWORD environment variables to a user who has permission to pause the system.
- Set NZ_USER to a user who has permission to pause the system, and cache that user's password.
If you run the nzhostbackup command, then change a user's password and then run the nzhostrestore command, the old password is replaced.
Syntax
nzhostbackup [-g GRACE_PERIOD] [-D DATA_DIR] [--nokeydb] [-sklm] FILE
nzhostbackup -h
Inputs
Input | Description |
---|---|
-h | Displays online help for this command. |
-g GRACE_PERIOD | Specifies the maximum time to wait (in seconds) for queries (or any system action, such as a load) to finish before the system begins the backup. After the system waits this amount of time, it cancels any remaining queries and starts the backup. The default is 60 seconds. |
-D DATA_DIR | Specifies the path name of the system data directory to back up. The default is the NZ_DATA_DIR, which is usually /nz/data. |
--nokeydb | Specifies not to back up the keystore for self-encrypting drives |
--sklm | If the host uses the IBM® Security Key Lifecycle Manager keystore to hold the SED key, retrieves the AEKs from ISKLM and creates a GSKit keystore, which is included in the host backup. Cannot be used in combination with the --nokeydb option. |
FILE | Specifies the path name of the archive file that you want to create. This file is a compressed tar file. |
Description
- Privileges required
- You must specify a database user account that has Manage System privileges.
- Common tasks
- You can run the nzhostbackup command when the
system is online, paused, offline, or stopped.
- If you run the nzhostbackup command while the system is online, the nzhostbackup command pauses the system for the duration of the backup.
- All currently running queries run to completion before the backup begins, subject to the time_out value you specify, or 60 seconds if you do not specify time_out. The system queues new queries until the backup completes.
Determine the data directory
- -D on command line
- NZ_DATA_DIR environment variable
- NZ_DIR/data, where NZ_DIR is determined from NZ_KIT_DIR or relative to the location of the script itself.
In addition, if you unset NZ_DIR and NZ_KIT_DIR and then run the nzhostbackup backup_dir command, the command works because it internally determines the location of NZ_KIT_DIR, NZ_DIR and NZ_DATA_DIR.
Usage
- To back up the default data directory, enter:
nzhostbackup /home/host/backup.tar.gz
- To specify a timeout period of 5 minutes, rather than the default
60 seconds, enter:
nzhostbackup -g 300 /home/host/backup.tar.gz