Command syntax for nzbackup

The nzbackup command supports the following syntax:

nzbackup { [-h|-rev] |
[-v] [-db database] { [-dir directory list] | [-dirfile dir file] }
[-connector conname] [-connectorArgs "args"] [-differential]
[-cumulative] [-globals] [-u username] [-pw password] [-streams num]
[-noData] [-history] [-backupset ID] [-secret value] }
The following table describes the command parameters.
Table 1. nzbackup command parameters
Parameter Description Example
-h Displays the help for the command.  
-rev Displays the software revision of the command.  
-host Specifies the host name or IP address of the IBM® Netezza® host.

Default: Value of NZ_HOST

-v[erbose] Specifies the verbose mode, lists the objects that are being backed up.  
-db database Backs up the specified database and all its objects and the users, groups, and permissions that are referenced by those objects.

If you specify this option, you cannot specify -globals. For more information, see Back up and restore users, groups, and permissions.

Default: Value of NZ_DATABASE

-db ttdev
-dir directory Specifies a list of one or more space-separated, full path names of the directories where the data is to be stored. This option applies to filesystem only. You can specify up to 16 directories.

The directories that you specify are the root for all backups. The system manages the backups in the subdirectories within each root directory.

-dir /home/user/backups


-dir /home/backup1 /home/backup2/ /home/backup3/

-dirfile Specifies a file with a list of backup target directories, one per line. -dirfile /home/mybackuptargetlist
-connector conname Names the connector to which you are sending the backup. Valid values are:
  • filesystem (this is the default)
  • tsm
  • netbackup
  • networker

If you have both the 32-bit and 64-bit clients installed for either TSM, NetBackup or Networker, the system defaults to using the 32-bit client. You can force the system to use the 64-bit client by specifying the name (tsm6-64, netbackup7-64, or networker7-64) in the -connector option. If only the 64-bit client is installed, the system uses the 64-bit client to perform the backup.

The system discovers the backup software that is based on the connector name that you specify. If there are several versions of a backup connector installed (for example, TSM 5 and TSM 6), you can identify a specific version by using one of these values:
  • tsm5
  • tsm6
  • tsm6-64 (used for TSM 6 and TSM 7 64-bit clients)
  • netbackup6
  • netbackup7
  • netbackup7-64
  • netbackup8-64
  • networker7 (used for NetWorker 7 and NetWorker 8 32-bit clients)
  • networker7-64 (used for NetWorker 7 and NetWorker 8 64-bit clients)
-connector netbackup
-connectorArgsargs Specifies a colon-separated list of pass-through arguments for the connector. The argument string must be enclosed in double quotation marks.
-differential Specifies a differential backup (that is, only the data that changed since the last backup).  
-cumulative Specifies a cumulative backup (that is, the command backs up only the changes since the last full backup).  
-globals Backs up all users, groups, and global permissions. The command also backs up multi-level security objects such as categories, cohorts, and levels (described in the IBM Netezza Advanced Security Administrator's Guide).

If you specify this option, you cannot specify -db. For more information, see Back up and restore users, groups, and permissions.

-u username Specifies the Netezza user name to connect to the database.

Default: Value of NZ_USER

-u user_1
-pw password Specifies the user password.

Default: Value of NZ_PASSWORD

-streams num Backs up the data by using the specified number of streams. For more information, see Multi-stream backup.

Default: Value of host.bnrNumStreamsDefault (see Changing configuration settings)

-streams 3
-noData Saves only the definitions of the objects such as tables, views, synonyms and others, as well as the access privileges defined in the specified database. The user data in tables or views is not saved.

This option is an easy way to replicate an empty database with all its object definitions and privileges in a Netezza system.

-history Prints the backup history report.  
-backupset ID Specifies the backup set that you want to use for incremental backup, rather than the default.

The default backup set is the most recent backup set of the database you specify. You can override the default by using this option.

Default: The most recent full backup set

-backupset 20060523200000
-secret value Specifies a string value that is needed to generate a 256-bit symmetric key, which is used to encrypt the host key in the backed up data. -secret toplevel
-disableViewCheck If a database contains invalid views, the backup operation fails with an error. If you do not want to remove invalid views, you can use the -disableViewCheck option to disable the part of the backup process that validates all views and materialized views before proceeding with backup. This option is available starting with versions nzbackup -db <dbName> -dir <backupPath> -disableViewCheck
-useCxidZonemap value This option allows you to use zonemap on createxid to improve differential backup performance by avoiding scanning of the entire table. The option is disabled by default in versions prior to With the release of this option is enabled by default. It takes the following values:
  • 0 for disabling this option
  • 1 for enabling this option
nzabckup –db db1 –dir /tmp/db1 –useCxidZonemap 1 -differential
-compressionLib LIB If not provided, the default compression library is used. The default value is zlib.

zlib and zstd are the accepted arguments.

Backup may be loaded only on a system with the same number of data slices as the source system.

Backups from IBM PureData System for Analytics continue to be compatible with NPS®

-compressionLvl # The option can be used only with the -compressionLib zstd option. -compressionLvl is not valid with -compressionLib zlib.

The default zstd compression level is 1. This compression level is used if you don't specify the value.

The compression level must be in the range of -131072 through 22.

Backups from IBM PureData System for Analytics continue to be compatible with NPS.


Environment settings for backup

By default, the nzbackup command uses the values of the environment variables NZ_DATABASE, NZ_USER, and NZ_PASSWORD, unless you specify values for -db for NZ_DATABASE, -u for NZ_USER, and -pw for NZ_PASSWORD.

The following table lists the nzbackup command environment variables.
Table 2. Environment settings
Name Corresponding command-line parameter
NZ_DATABASE Same as -db
NZ_USER Same as –u
NZ_PASSWORD Same as –pw

Backup errors

The nzbackup command writes errors to the log file /nz/kit/log/backupsvr/ For more information about the log files, see System logs.