Running file system backups

Deployment options: Netezza Performance Server for Cloud Pak for Data

Learn how to run file system backups.

Procedure

  1. Take a backup by running the nzbackup command.
    nzbackup -db SRCDB -dir /nzscratch/backups
    For more information, see The nzbackup command .
  2. Change directories and upload the backup to cloud by using the nz_s3connector utility:
    cd /nz/support/bnr
    • Upload to IBM Cloud:
      ./nz_s3connector -db SRCDB -dir /nzscratch/backups -connectorArgs "UNIQUE_ID=SAMPLEBKUP:ACCESS_KEY_ID=xxxxx:SECRET_ACCESS_KEY=xxxxx:DEFAULT_REGION=us-west-1:BUCKET_URL=my.backup.bucket:ENDPOINT=s3.us-east.cloud-object-storage.appdomain.cloud"-npshost hostname -upload -verbose
      ENDPOINT is mandatory. The ENDPOINT and DEFAULT_REGION used are just examples. You might need to use different values as per the location of your bucket. For more information about nz_s3connector, see AWS S3, MinIO, and IBM Cloud Object Storage connectors.
    • Upload to AWS:
      ./nz_s3connector -db SRCDB -dir /nzscratch/backups -connectorArgs "UNIQUE_ID=SAMPLEBKUP:ACCESS_KEY_ID=xxxxx:SECRET_ACCESS_KEY=xxxxx:DEFAULT_REGION=us-west-1:BUCKET_URL=my.backup.bucket"-npshost hostname -upload -verbose
      ENDPOINT is not mandatory. The DEFAULT_REGION used is just an example. You might need to use different values as per the location of your bucket.
    • Upload to Azure:
  3. Synchronize users:
    /nz users sync-from-nps -nps-host <nps-host> -u <user> -pw <password> -host <host> -new-pw <new-pw>
    
    For more information, see The nz users command.
  4. Restore the backup from cloud by running the nzrestore command or the nz bnr command.
    The nzrestore command
    Log in to your host pod and run the nzrestore command:
    • For IBM Cloud:
      nzrestore -db SRCDB -sourcedb SRCDB-connectorArgs "UNIQUE_ID=SAMPLEBKUP:ACCESS_KEY_ID=xxxxx:SECRET_ACCESS_KEY=xxxxx:DEFAULT_REGION=us-west-1:BUCKET_URL=my.backup.bucket:ENDPOINT=s3.us-east.cloud-object-storage.appdomain.cloud" -npshost <hostname> -verbose
      <hostname> is hostname that is specified in /nz/data/config/backupHostname.txt where backup was taken. ENDPOINT is mandatory. The ENDPOINT and DEFAULT_REGION used in the commands are just examples. You might need to use different values as per the location of your bucket.
    • For AWS:
      nzrestore-db SRCDB-sourcedb SRCDB -connectorArgs "UNIQUE_ID=SAMPLEBKUP:ACCESS_KEY_ID=xxxxx:SECRET_ACCESS_KEY=xxxxx:DEFAULT_REGION=us-west-1:BUCKET_URL=my.backup.bucket" -npshost <hostname> -verbose
      <hostname> is hostname that is specified in /nz/data/config/backupHostname.txt where backup was taken. ENDPOINT is not mandatory. The DEFAULT_REGION used in the commands is just an example. You might need to use different values as per the location of your bucket.
    • For Azure:
    The nz bnr command
    Run the nz bnr command:
    ./nz bnr ls scan-object-store -u $NZ_USER -pw $NZ_PASSWORD -host $NZ_HOST -unique-id <unique-id>
    Where:
    unique-id
    Specifies the top-level directory name on the backup that is being migrated.
    For more information about the nz bnr command, see The nz bnr command.
  5. Synchronize users after migration:
    /nz users sync-from-nps -nps-host <nps-host> -u <user> -pw <password> -host <host> -new-pw <new-pw>
    
    For more information, see The nz users command.