Restore an incremental backup

Deployment options: Netezza Performance Server for Cloud Pak for Data System Netezza Performance Server for Cloud Pak for Data

Restoring an incremental backup restores a subset of a backup set that includes a full backup, and any number of incremental backups. An incremental restore creates a database or appends to an existing database created through a previous restore, depending on the incremental restore type. You can restore by using three methods: up-to-x, step-by-step, or remainder incremental.

For the restore to return a database to a known state, the database must not be allowed to change during multi-step restore operations. Specifying the -lockdb option makes the database read-only and allows subsequent restore operations to the database.

To restore another increment after you perform a restore, you must specify -lockdb before an append restore operation. You cannot do an append restore operation unless the database was locked in a previous restore operation.

After the restore is complete, you can unlock the database by using the nzrestore command and specify the database, for example:
nzrestore -db dev -unlockdb

Up-to-x restore

Up-to-x restore restores a database from a full backup and then up to the specified increment. You can follow the up-to-x restore with a step-by-step restore.

Issue the -incrementlist option to view a report that lists increment numbers.

For example, the following command restores the full backup of database dev and then up to increment 4.
nzrestore -db dev -connector netbackup -increment 4

Step-by-step restore

Step-by-step restore restores single incrementals in chronological order. The nzrestore command maintains a restore history system table on the target system and queries this table to determine which increment to restore.

Remember: Lock the database with the first nzrestore command and to unlock it with the last.
For example, the following command line restores the full backup and then up to a specific incremental of the database dev, and then steps through the following incrementals.
nzrestore -db dev -connector netbackup -increment 4 -lockdb true
nzrestore -db dev -connector netbackup -increment Next -lockdb true
nzrestore -db dev -connector netbackup -increment Next -lockdb false

To begin with the first increment when the database does not yet exist, specify the -increment 1 option. You can then step through the increments by specifying -increment Next.

Remainder restore

A remainder restore restores all the remaining increments from a backup set that are not yet restored. For example, after you restore to an increment ID (and possibly some step restores), the following command restores any remaining increments in the backup set.
nzrestore -db dev -connector netbackup -increment REST