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
- Run a backup operation on the source system:
- Identify tables with a large incremental delete file
size.Example:
The delete file hasls -lhrt /BACKUP_FS/Netezza/PDA-H1/DBNAME/20201212121212/2/DIFF/data/*del*
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.
- Run the tool against the tables from step
1a.
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/support/bin/nz_update_backup_status <database> <table>
- nz_update_backup_status
-
- 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.
- The script doesn't GROOM or TRUNCATE table.
- 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.
- Run a differential backup of the database.
- Identify tables with a large incremental delete file
size.
- Run a restore operation on the target system:
- Change directories to the backup path, in which the large delete table was identified in step
1a:
Example:cd to the /md subdirectory of the backup path
cd /BACKUP_FS/Netezza/PDA-H1/DBNAME/20201212121212/2/DIFF/md/
- Back up the
schema.xml
andcontents.txt
files.When you are working with amulti-stream
and ormulti-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
- Edit the
schema.xml
file by removing the entries that define the table (based on theoid
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>
- Edit the
contents.txt
file by removing the entries of any data files that are associated with this table (based on that table’soid
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
- 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.
- Change directories to the backup path, in which the large delete table was identified in step
1a: