Forum Discussion
Finally getting somewhere by running:
nbstlutil list -rt IC -image_state 2
The critcical change is using "-rt IC", rather than "-rt I" which gives me the COPY record as well as the Image record and the COPY record contains the jobid. It is not quite so straight forward as there is more than one COPY record, so I need to just look at the "DUPLICATION" copy record. Even then I get different backup-id's with the same jobid, which I haven't figured out why yet, so I then have to select the last backup-id, so I do all this as follows:
On Solaris MNU master:
nbstlutil list -rt IC -image_state 2 > nbstl-list-image_state_2-rt_IC
Copy file to Linux as Solaris does not have gawk installed which can use the strftime function to convert EPOCH time to a readable format, and then on Linux run:
awk 'BEGIN {dt="%y/%m/%d-%T";print "Backup_ID Client Backup_Time Policy Storage_Lifecycle_Policy Time_In_Process Job_ID" } $2 == "I" {image=$4" "$5" "strftime(dt,$6)" "$7" "$10" "strftime(dt,$12)} $2 == "C" && $5 == "2" {print image, $10} ' nbstl-list-image_state_2-rt_IC | awk ' jobid != $NF {print saved} {saved=$0; jobid=$NF} END {print saved}'
So the first awk above prints fields from Image record + the job id from the copy record of type 2 (duplication) and then the second awk filters this to only print the last backup_id where the job_id's match.
Mike
Related Content
- 10 years ago
- 12 years ago
- 10 years ago