Netezza Backup and Restore: Best Practices

  • Post author:
  • Post last modified:February 28, 2018
  • Post category:Netezza
  • Reading time:4 mins read

In this post you will learn about Netezza backup and restore data. It provides general information on backup and restore methods available with Netezza system.

Netezza Backup and Restore Overview

Netezza provides several backup and restore methods as per the different requirements. You can take table or database backup whenever required:

  • You can create full and incremental backups of your various Netezza databases in compressed internal using the nzbackup command and restore them to a Netezza system whenever required using nzrestore command. As a best practice create script that perform the full and incremental backup and schedule the same.
  • Unload individual table’s data in compressed internal format using the CREATE EXTERNAL TABLE command, later you can load the data using the nzload command.
  • You can also unload the individual table in text formats using CREATE EXTERNAL TABLE available in Netezza.
  • You can create backups of the system catalog (the /nz/ directory) on the Netezza host using the nzhostbackup command. Later, in case of data corruption, you can restore using nzhostrestore command.

Netezza Backup Types

There are different kinds of backup options available:

Read:

Netezza Full Backup

This process backup full database every time you run it.

For example, to backup contents of database DB1 to directory /mnt/data/backups:

nzbackup -dir /mnt/data/backups -u user -pw password -db DB1

Incremental Backups

Incremental backups are database backups that save only the data that changed since the last backup

Netezza supports two types of incremental backups:

Differential Backup

This backup type includes all the changes that are made to the database since the previous full, differential or cumulative backup. You should have full backup of the database before using differential backup option.

nzbackup -dir /mnt/data/backups -u user -pw password -db DB1 –differential

Cumulative Backup

This backup type includes all the changes that are made to the database since the last full backup. Cumulative backups consolidate and replace any differential backups that were run since the last full backup.

nzbackup -dir /mnt/data/backups -u user -pw password -db DB1 -cumulative

Below figure shows the sample backup process: A- Full Backup, B- cumulative and C-series of differential backups:

netezza backup and restore

Netezza Backup and Restore Best Practices

  • Create script that executes the recommended backups and schedule it to perform backup.
  • The following backups are recommended on a weekly basis:
    • nzhostbackup (requires a system Pause)
    • nzbackup -globals -dir /path/to/storage
  • A FULL backup of each user database should be taken regularly weekly, bi-weekly, or monthly.
  • A differential backup of each user database should be taken daily.

Netezza Restore Examples

Finally, you can restore the Netezza database by using nzrestore command: For example,

nzrestore -db db1 -u user -pw password -dir /mnt/data/backups -v