lease follow the below syntax to restore the table when you take the backup using nz_backup for single table.
[nz@SERVER_NAME ~]$ nz_restore -format binary -dir /netback/backup/test/Netezza/NZ81331-H1/TEST/whdev/ -db TARGTE_DB_NAME-t ADMINISTRATOR_140923_152501
nz_restore of database TARGTE_DB_NAMEstarted on 2014-02-28 14:22:18
NZ_HOST:
NZ_USER: ADMIN
NZ_DATABASE: DB_NAME1
Backup Directory: /netback/backup/test/Netezza/NZ81331-H1/TEST/whdev/
Backup Format: binary
Custom Script:
# Of Threads: 1
Using stableTXid: 0
The lastTXid assigned was: 0
Debug Mode: Disabled
=======================================================================================
Info: table 1 of 1 ADMINISTRATOR_140923_152501
Info: restore process started 2014-02-28 14:22:19
Info: # of bytes to be read 1,650,875
Info: reloading data ( thread 1 of 1 )
Info: data flowing ...
Info: reload finished ( thread 1 of 1 ) seconds 1
Info: reload results ( thread 1 of 1 ) INSERT 0 57840
Info: data flow finished
Info: restore process ended 2014-02-28 14:22:20
Info: rate (restore file size / # of seconds elapsed) 1,650,875
Info: # of records reloaded 57,840
Info: # of seconds elapsed 1
=======================================================================================
nz_restore of database TARGTE_DB_NAMEfinished on 2014-02-28 14:22:20
Total # of tables processed: 1
Total # of records reloaded: 57,840
Total # of seconds elapsed : 1
TOTAL restore file size : 1,650,875
rate (bytes per second) : 1,650,875
[nz@SERVER_NAME ~]$ nz_restore -format binary -dir /netback/backup/test/Netezza/NZ81331-H1/TEST/whdev/ -db TARGTE_DB_NAME-t ADMINISTRATOR_140923_152501
nz_restore of database TARGTE_DB_NAMEstarted on 2014-02-28 14:22:18
NZ_HOST:
NZ_USER: ADMIN
NZ_DATABASE: DB_NAME1
Backup Directory: /netback/backup/test/Netezza/NZ81331-H1/TEST/whdev/
Backup Format: binary
Custom Script:
# Of Threads: 1
Using stableTXid: 0
The lastTXid assigned was: 0
Debug Mode: Disabled
=======================================================================================
Info: table 1 of 1 ADMINISTRATOR_140923_152501
Info: restore process started 2014-02-28 14:22:19
Info: # of bytes to be read 1,650,875
Info: reloading data ( thread 1 of 1 )
Info: data flowing ...
Info: reload finished ( thread 1 of 1 ) seconds 1
Info: reload results ( thread 1 of 1 ) INSERT 0 57840
Info: data flow finished
Info: restore process ended 2014-02-28 14:22:20
Info: rate (restore file size / # of seconds elapsed) 1,650,875
Info: # of records reloaded 57,840
Info: # of seconds elapsed 1
=======================================================================================
nz_restore of database TARGTE_DB_NAMEfinished on 2014-02-28 14:22:20
Total # of tables processed: 1
Total # of records reloaded: 57,840
Total # of seconds elapsed : 1
TOTAL restore file size : 1,650,875
rate (bytes per second) : 1,650,875
After running this table i am geting below error table is exist in source table but not in target table.
ReplyDelete[nz@ewr-nzmdw-d1 cfg]$ /nz/support-IBM_Netezza-6.0.5.17-130322-1444/bin/nz_restore -db MT_WH_D01 -format binary -dir /mnt/nfs/test_TBL_AP_FEE_PACKAGE_PIVOT -t TBL_AP_FEE_PACKAGE_PIVOT
ERROR: No such table 'TBL_AP_FEE_PACKAGE_PIVOT'
[nz@ewr-nzmdw-d1 cfg]$