Command syntax for nzbackup

Deployment options: IBM Netezza Appliance IBM Netezza Appliance

Syntax

The nzbackup command supports the following syntax:
nzbackup { [-h|-rev] [-hc conname] |
[-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 parameters.
Table 1. The nzbackup command parameters
Parameter Description Example
-h Displays the help for the command.  
-rev Displays the software revision of the command.  
-host Specifies the hostname or IP address of the host.

The default is the value of NZ_HOST.

 
-hc conname Provide details about all possible arguments that can be used with connectorArgs for different connectors (for example, networker, netbackup, netbackup8-64, tsm, s3). nzbackup -hc networker
-v[verbose] 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.

The default is the 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 file system only. Up to 11.2.1.9, you can specify up to 16 directories. Starting with 11.2.1.10, you can specify up to 30 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.

You can specify up to 16 file system locations for your backups. If you are on 11.2.2.5 or later, you can specify up to 32 file system locations.

-dirfile /home/mybackuptargetlist
-connector conname Names the connector to which you are sending the backup. Valid values are:
  • File system

    Default value.

  • Tivoli Storage Manager
  • NetBackup
  • NetWorker

If you have both the 32-bit and 64-bit clients that are installed for either Tivoli Storage Manager, 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 do the backup.

The system discovers the backup software that is based on the connector name that you specify. If you have several versions of a backup connector installed (for example, Tivoli Storage Manager 5 and Tivoli Storage Manager 6), you can identify a specific version by using one of these values:
  • tsm5
  • tsm6
  • tsm6-64 (used for Tivoli Storage Manager 6 and Tivoli Storage Manager 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.
Connection arguments:
For IBM Cloud:
For AWS:
connector s3
UNIQUE_ID=
ACCESS_KEY_ID=
SECRET_ACCESS_KEY=
DEFAULT_REGION=
BUCKET_URL=
For Azure:
connector az
UNIQUE_ID=
STORAGE_ACCOUNT=
KEY=
CONTAINER=
“name=value[:name
=value:...]”
-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.

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

-globals
-u username Specifies the Netezza Performance Server username to connect to the database.

The default is the value of NZ_USER.

-u user_1
-pw password Specifies the user password.

The default is the value of NZ_PASSWORD.

-pw XXXXXX
-streams num Backs up the data by using the specified number of streams. For more information, see Multi-stream backup.
The default is the value of host.bnrNumStreamsDefault (see Changing configuration settings).
Tip: Use -streams as half the number of available CPU cores for optimal performance and resource utilization.
-streams 3
-noData Saves only the definitions of the objects such as tables, views, synonyms, 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 Performance Server system.

-noData
-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.

The default is 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 7.2.0.9-P3/7.2.1.3-P3. nzbackup -db <dbName> -dir <backupPath> -disableViewCheck
-useCxidZonemap value With this option, you can use zonemap on createxid to improve differential backup performance by avoiding scanning of the entire table. 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.

Backups might be loaded only on systems with the same number of data slices as the source system.

Starting with 11.2.0.0, the restriction does not apply.

Backups from IBM® PureData® System for Analytics 7.1.2.7 continue to be compatible with Netezza Performance Server.

 
-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 7.1.2.7 continue to be compatible with Netezza Performance Server.
 
- skipUnchangedViewDefs Enables a feature to skip an unchanged view definition in a differential backup. skipUnchangedViewDefs
-schemas schema_name Specifies a list of one or more space-separated (case insensitive) schema names. By default, the schemas are backed up along with the admin schema. You can change the default schema from admin to any user-defined schema.

Backup will be taken at Schema Level with all the supportable objects respective to that Schemas.

-schema SCH1 SCH2

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/backupsvr.pid.date.log. For more information about the log files, see System logs.