Video Screencast Help
Symantec to Separate Into Two Focused, Industry-Leading Technology Companies. Learn more.
Backup and Recovery Community Blog

Ever wanted FETB report from PureDisk?

Created: 11 Nov 2012
Abesama's picture
0 0 Votes
Login to vote

With some help from Symantec Tech Support, I managed to put this script together.

Run it on your SPA node, it will report on the total size of dataselection on source for all active dataselections under all active agents.

Put it on crontab on the SPA node, you now have your own FETB report automated, delivered to your email address!

Enjoy.

(tested on PureDisk 6.6.3)

= = =

#!/bin/sh
echo 'agentid,sizeonsourcelastversion,hostname' > /tmp/filename.csv
echo '-------,-----------------------,---------------------------------' >> /tmp/filename.csv
i=0
j=0
for j in `/opt/pddb/bin/psql -U pddb ca -c "select dataselection.agentid,dataselection.sizeonsourcelastversion,agent.hostname from dataselection,agent where dataselection.agentid=agent.id and agent.statustypeid=2 and dataselection.sizeonsourcelastversion!=0 and dataselection.disabled=0" | head -n -2 | tail +3 | awk '{print $3}'`
do
i=$(($i+$j))
done
/opt/pddb/bin/psql -U pddb ca -c "select dataselection.agentid,dataselection.sizeonsourcelastversion,agent.hostname from dataselection,agent where dataselection.agentid=agent.id and agent.statustypeid=2 and dataselection.sizeonsourcelastversion!=0 and dataselection.disabled=0" | head -n -2 | tail +3 | sort | sed s/\|/\,/g >> /tmp/filename.csv
echo "Total,$i,byte" >> /tmp/filename.csv
echo "Total frontend size of backups report `date`" | mailx -s "Total frontend size of backups report `date`" -a /tmp/filename.csv my.email@address.com