TSM命令获取GB的备份计数?

时间:2016-11-10 08:44:20

标签: sql tivoli

有人可以提供TSM命令来获取GB过去30天的备份数量吗?

我们可以在TSM上执行以获取过去24小时数据大小的SQL命令示例:

SELECT substr(entity,1,20) AS "Node", CAST(sum(bytes/1024/1024) AS decimal(8,2)) AS "MB Bkp"
FROM summary
WHERE activity = 'BACKUP' AND start_time>=current_timestamp - 24 hours
GROUP BY entity
order by 2 desc

1 个答案:

答案 0 :(得分:0)

我多年没有在TSM工作了,但你能不能简单地将WHERE子句中的小时数改为24小时* 30天?

SELECT substr(entity,1,20) AS "Node", CAST(sum(bytes/1024/1024) AS decimal(8,2)) AS "MB Bkp"
FROM summary
WHERE activity = 'BACKUP' AND start_time>=current_timestamp - 720 hours
GROUP BY entity
order by 2 desc

要获取GB,请在SELECT子句中将字节再次除以1024.