Forcing a full table backup with the nz_update_backup_status command

Deployment options: Netezza Performance Server for Cloud Pak for Data System Netezza Performance Server for Cloud Pak for Data

Learn how to force a full table backup on the next differential backup run by running the nz_update_backup_status command.

Important: The procedure must be completed under the guidance of IBM Support.

Procedure

  1. Run a backup operation on the source system:
    1. Identify tables with a large incremental delete file size.
      Example:
      ls -lhrt /BACKUP_FS/Netezza/PDA-H1/DBNAME/20201212121212/2/DIFF/data/*del*
      The delete file has oid of table. For example, 42526292.del.1.1.

      If a backup is taken with the multi-destination file systems option, check all paths.

      To find the table name from the oid that was obtained with the delete file, use /nz/support/bin/nz_find_object script.

      For example, /nz/support/bin/nz_find_object 42526292.

    2. Run the tool against the tables from step 1a.
      /nz/support/bin/nz_update_backup_status <database> <table>
      If the nz_update_backup_status script is not present, copy it from /nz/support/bin/ on Netezza and place it in the /nz/support/bin/ folder.
      nz_update_backup_status
      1. The script doesn’t change the existing storage that is corresponding to a table. It just tweaks backup metadata to force a full backup of a table for next differential backup.
      2. The script doesn't GROOM or TRUNCATE table.
      3. After you issue this script on a table, a full backup is done on that table on the next differential backup run. This means that the whole table is backed-up, not just the differences. All other tables are unaffected, and they undergo differential backup.
    3. Run a differential backup of the database.
  2. Run a restore operation on the target system:
    1. Change directories to the backup path, in which the large delete table was identified in step 1a:
      cd to the /md subdirectory of the backup path
      Example:
      cd /BACKUP_FS/Netezza/PDA-H1/DBNAME/20201212121212/2/DIFF/md/
    2. Back up the schema.xml and contents.txt files.
      When you are working with a multi-stream and or multi-dir backup, it is suggested that only one instance of these two files exists. It is suggested that it is under the first backup location.
      cp schema.xml schema.xml.original
      cp contents.txt contents.txt.original
    3. Edit the schema.xml file by removing the entries that define the table (based on the oid value that was identified in step 1a).
      <TABLE ver="2" name="MYTEST_TABLE" schema="ADMIN" owner="ADMIN"    oidhi="0"   oid="42526292" ...
      <COLUMN name="C1" ...
      <COLUMN name="C2" ...
      ...
      </TABLE>
    4. Edit the contents.txt file by removing the entries of any data files that are associated with this table (based on that table’s oid number). There might be multiples of each one.
      42526292.del.1.1,77772316,0,5,23129,1
      42526292.incr.1.1,77772316,0,4,7307,1
    5. Restore incremental backups of this backup set until you reach the differential backup that was taken in step 1c.

      When you reach the differential backup from step 1c, the procedure is complete.