11-27-2016 12:39 AM
NBU 7.6.0.3
i can manually get to the backup sizes per client using Reports/Client Backups but that would take me ages to do by hand. i've also looked into OpsCenter reports but for some reason, it only provides me some clients when i wanted all clients. i used the template "Backup Reports/Job Size" and edited it to what i what (only active policies) however it doesn't give me per client. instead there would be a bunch of data sizes. as you can see in the picture below, there are two data sizes but the backup policy only runs once per week, 8am to 10am.
i need a report to tell me one data size for this client, regardless of backup window or backup frequency.
is there another way?
11-27-2016 04:30 AM
Rino19ny,
You didn't say if you're using Opscenter Analyitics, but here's a SQL query we wrote to give backup totals per client for the past 7 days.
SELECT
MS.Name AS "Media Server",
J.clientName AS "Client",
SUM(J.bytesWritten) AS "Bytes Written",
ROUND(CONVERT(NUMERIC(12,2),"Bytes Written"/1048576),2) AS "MB Written",
ROUND(CONVERT(NUMERIC(12,2),"Bytes Written"/1073741824),2) AS "GB Written"
FROM
domain_job J LEFT JOIN domain_MediaServer MS ON J.MediaServerID = MS.ID
WHERE MS.deleted=0
AND J.State=3
AND J.StatusCode<2
AND J.Type=0
AND (DateDiff(ss,(DateAdd(ss,(datediff(ss,current utc timestamp,GetDate())),(UTCBigintToUTCTime(J.EndTime)))),GetDate())) BETWEEN 0 AND 604800
AND J.filesBackedUp>0
GROUP BY "Client", "Media Server"
ORDER BY "Media Server"
You can change the amount of time you want to pull by changing the bolded portion above, (604800 is seconds in 7 days).
This will give you an output below (named blocked out to protect the innocent). :)
The output will be sorted by media server, then client.
Hopefully this is useful. :)
-Steve
11-27-2016 05:32 AM
thanks for sharing.
i ran it for 7 days and for 24 hours (86400 seconds). why i ran for 24 hours is i want to see just how big the data that were being backup witout repeating. my Oracle db is 1.2 TB but when i ran the script for 86400 seconds, it only gave me 188 GB. we always do full backup daily.
anyway, i'm not a SQL expert so is there anything else i should adjust in the script besides the time period?
11-28-2016 03:59 AM
Hey
I'm not sure what you mean by sizes. But I often use the "nbdeployutil --gather" if you want to see how much a full backup of each client is. Then after run the appropriate "--capacity" report with the output parameters specified in the output of the --gather command.
It gives it, in an easy to use spreadsheet. under the "itemization tab". Both capacity/traditional reports have the sizes
NBDEPLOYUTIL is in <install path>/veritas/netbackup/bin/admincmd/ if memory serves correctly.