Restore the host data directory and catalog

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

After using the nzhostbackup command, use the nzhostrestore command to restore the files in the data directory.

The nzhostrestore command stops the system and then restores the catalog.

The nzhostrestore command synchronizes the SPUs with the restored catalog on the host; as a result, it rolls back any transactions that occurred after the host backup. The host restore operation cannot roll back changes such as drop table, truncate table, or groom operations. If these changes occurred after the host backup was made, the host restore might cause those affected tables to be in an inconsistent state. Inspect the data in those tables, and if necessary, reload the tables to match the time of the host backup.

The following is an example:
nzhostrestore /backups/nzhost_latest.tar.gz
Starting host restore 
Extracting host data archive ... 
Restore host data archived Thu Dec 24 03:42:02 EST 2009? (y/n) [n] y 
Stopping the system ... 
Starting topology restore ... 
Stopping the system ... 
Warning: The hardware ids will be reassigned. 
   The hardware id assignments from the archived system catalog have
   been saved in '/tmp/hwids-old.z.tar' 
Reinitializing hardware metadata ... 
Restoring the devmap / topology tables ... 
Stopping the system ... 
Starting the system ... 
Waiting for system to go online ... 
Checking for orphaned SPU tables ... 
Loading hardware ids ... 
Topology recovery completed successfully. 
Stopping the system ... 
Warning: The restore will now rollback spu data to Thu Dec 24 03:42:02 
EST 2009. 
   This operation cannot be undone. Ok to proceed? (y/n) [n] y 
Installing system catalog to '/nz/data.1.0' ... 
StarSynchronizing data on spus ... 
done. 

Stopping the system ... 
Restore complete. You can now start the system using 'nzstart'. 

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

After the restore, the hardware IDs for the SPUs and disks typically change; however, their location and roles remain the same as they were before the host restore.

If any tables were created after the host backup, the nzhostrestore command marks these tables as “orphans,” which means that they are inaccessible but they consume disk space. The nzhostrestore command checks for orphaned tables and creates a script that you can use to drop orphaned user tables. The location and name are mentioned in the nzhostrestore log. The nzhostrestore command also rolls back the data on the SPUs to match the transaction point of the catalog in the host backup.