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.
- 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
- 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:
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.call nza..metadata_analyze('mode=backup');
- Issue the nzbackup command to create a full or incremental backup of a database.
Restore
- Issue the nzrestore command to restore a database.
- 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:
- From the /nz/export/ae/utilities/bin directory, run the following
command:
./create_inza_db.sh dbname
- Reassign the user rights.
- From the /nz/export/ae/utilities/bin directory, run the following
command:
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.
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
- 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 themultiple 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.