Host backup and restore to the Tivoli Storage Manager server

Deployment options: IBM Netezza Appliance

You can perform a backup and restore of the Netezza host metadata by using the Tivoli® Storage Manager connector. You create scripts for the Netezza Performance Server host, which runs a host backup and sends the backup to the Tivoli Storage Manager server, and scripts that retrieve and restore a backup. The nzhostbackup and nzhostrestore commands do not directly support the Tivoli Storage Manager connector.

For example, the following sample script uses the nzhostbackup command to create a host backup in the specified /tmp archive and then sends the backup to the Tivoli Storage Manager server:
#!/bin/bash
#
# nzhostbackup_tsm - back up the host catalog and send it to TSM server

archive="/tmp/nzhostbackup.tar.gz"

# Main script execution starts here

(
    nzhostbackup "${archive}"

    echo
    echo "Sending host backup archive '${archive}' to TSM server ..."
    dsmc archive "${archive}"
)

exit 0
Similarly, you can create a script to retrieve and reload a host backup from the Tivoli Storage Manager server:
#!/bin/bash
#
# nzrestore_tsm - restore host backup from TSM using nzhostbackup_tsm

# Main script execution starts here

if [ "$#" -eq 0 ]; then
    archive="'/tmp/nzhostbackup*'"
    echo "Querying for backups in ${archive} for host ${hostname} ..."
    echo
    dsmc query archive "${archive}"
    exit 0
fi

if [ "$#" -eq 1 ]; then
    archive_name="${1}"
    archive="${archive_name}"
    echo "Restoring the specified backupset '${archive}' ..."
    echo

    (
        dsmc retrieve "${archive}"
        echo
        echo "Archive '${archive}' retrieved, restoring it..."

        nzhostrestore "${archive}"
    )
fi

exit 0