Pre-upgrade database backup and post-upgrade restore

Before you upgrade Netezza Performance Server Analytics, back up your existing databases. After upgrading, restore them.

  • Use nzbackup to create a full or incremental backup of a database.
  • Use nzrestore to restore a database to the same or another system.

You can use these commands also to back up and restore databases that are enabled for Netezza Performance Server Analytics. However, you must take extra steps to back up and restore the Netezza Performance Server Analytics-specific data correctly. Netezza Performance Server Analytics stores metadata about analytic models or matrices in each database; the additional steps are necessary to ensure that the metadata are correct and consistent after the restore operation.

Note:
  • You cannot use the nzhostbackup or nzhostrestore commands to back up or restore NPS Analytics metadata. These commands work only for host metadata, that is, the database catalog.
  • You cannot use the inzabackup or inzarestore commands to back up or restore databases that are enabled for Netezza Performance Server Analytics. You can use these commands only to back up and restore files that are related to analytic executables.

Backup

  1. Netezza Performance Server Analytics stores metadata about models and matrices in a set of tables that are created when you enable a database for Netezza Performance Server Analytics. Check the consistency of these tables by logging in to the database as the administrator and running the following command:
    call nza..metadata_analyze('mode=backup');
    The command checks the consistency of the metadata of all analytics models. If necessary, the procedure also repairs possible inconsistencies. However, it checks and repairs only inconsistencies that must be fixed to ensure a correct restore operation of the metadata.
  2. Issue the nzbackup command to create a full or incremental backup of a database.

Restore

  1. Issue the nzrestore command to restore a database.
  2. If you restore a database by using a different name or on another Netezza Performance Server system, you must re-enable the database for Netezza Performance Server Analytics:
    1. From the /nz/export/ae/utilities/bin directory, run the following command:
      ./create_inza_db.sh dbname
    2. Reassign the user rights.

After a database that contains analytic models is restored, the Netezza Performance Server Analytics metadata tables might contain wrong references, such as names or object IDs, and the definition of the metadata views might be wrong. Wrong references occur especially when you restore the database to another name or on another system. To fix the wrong metadata, run the metadata_analyze procedure as the administrator.

After you restore and re-enable the database, log in to the database and run the following command:
call nza..metadata_analyze('mode=restore');
The procedure checks the consistency of the metadata of all analytics models. If necessary, the procedure also repairs possible inconsistencies and re-creates metadata views.

The multiple schema mode

When the multiple schema mode is turned on, you can restore a database that was backed up when the multiple schema mode was turned off.
Note:
  • If a database was backed up with multiple schema modes turned off, it can be restored with multiple schema modes is turned on. However, if you do, you must run the create_inza_db.sh script.

    You must complete these steps even if you restore the database to the same name.

  • If a database was backed up with the multiple schema mode turned on, it must be restored with the multiple schema mode turned on. Otherwise, the restore process attempts to merge the objects from all schemas into one schema, and the restore process fails.
  • You cannot restore a database on an Netezza Performance Server system with a system case that is different from the system case that was used during the backup. System cases can be uppercase or lowercase.