Hi All,
I have the script to pull the report for backup. When I run the below query , it gives me the output.
select entity, activity, CAST((START_TIME)AS DATE) AS "START DATE", CAST((START_TIME)AS TIME) AS "START TIME", CAST((END_TIME) AS TIME) AS "END TIME", SUBSTR(CHAR(END_TIME-START_TIME),1,10) AS "ELAPSED TIME", cast((bytes/1073741824) as dec (18,2)) AS "GB BACKED UP", SUCCESSFUL FROM SUMMARY where activity='BACKUP' and start_time >=current_timestamp - 24 hours
output:
ENTITY: Node1
ACTIVITY: BACKUP
START DATE: 2013-04-17
START TIME: 09:00:03
END TIME: 09:13:02
ELAPSED TIME: 1259.00000
GB BACKED UP: 108.00
SUCCESSFUL: YES
My requirement to get the Elapsed Time in minutes and exact data backed up like 107.35 GB or 108.15 GB like that. Here it gives me a rounded value...Also , I need to get one more field like status ...Whether the backup completed or missed or failed...Can any one help me.
Also, please share if anyone has shell script for daily backup report shell in linux.
Thanks
Frank
I have the script to pull the report for backup. When I run the below query , it gives me the output.
select entity, activity, CAST((START_TIME)AS DATE) AS "START DATE", CAST((START_TIME)AS TIME) AS "START TIME", CAST((END_TIME) AS TIME) AS "END TIME", SUBSTR(CHAR(END_TIME-START_TIME),1,10) AS "ELAPSED TIME", cast((bytes/1073741824) as dec (18,2)) AS "GB BACKED UP", SUCCESSFUL FROM SUMMARY where activity='BACKUP' and start_time >=current_timestamp - 24 hours
output:
ENTITY: Node1
ACTIVITY: BACKUP
START DATE: 2013-04-17
START TIME: 09:00:03
END TIME: 09:13:02
ELAPSED TIME: 1259.00000
GB BACKED UP: 108.00
SUCCESSFUL: YES
My requirement to get the Elapsed Time in minutes and exact data backed up like 107.35 GB or 108.15 GB like that. Here it gives me a rounded value...Also , I need to get one more field like status ...Whether the backup completed or missed or failed...Can any one help me.
Also, please share if anyone has shell script for daily backup report shell in linux.
Thanks
Frank