Tuesday, May 20, 2014

Netezza Backup History

Managing Netezza backup is not that flexible.  While you can get the backup history from nzbackup -history, there's nothing much you can do.  So, you still need to go the the catalog level and play with it.  Below is the query to get all the backup history from the catalog

select dbname, decode(type,0,'FULL',1,'DIFF',2,'CUM',4,'SCHEMA') TYPE,  
decode(status,0,'ACTIVE',1,'COMPLETED',2,'FAILED') STATUS,
date_trunc('day',starttime) start_date,
date_trunc('hour',starttime) start_time
from _t_backup_history
order by 3,4

Below describes the code and its meaning from the backup history catalog.

type 0 - Full
     1 - Diff
     2 - Cum
     3 - none
     4 - Schema

status 0 - Active
         1 - Completed
 2 - Failed

No comments:

Post a Comment