Skip to content

Netezza – How to backup all NzEvents in one go?

Here is the easy way to take a backup of Netezza events. Create a shell script with content (shown below) and execute the script. The script will create a file named backup_nzevent_DATETIME which will have a create NzEvent script for all the events in your NPS system.

for LINE in `nzevent -syntax`; do
echo "nzevent add ${LINE}" >> backup_nzevent_`date +%Y%m%d%H%M%S`.log

Once script is created run chmod 775 on Linux prompt to make it executable else script may not run.

This script will also be useful if you have to make mass changes to all the Netezza events like send email address list change, enable disable events, etc.