Try "mminfo -aX -q client=client_name", this gives you a pretty nice summary report. You can ofcourse use more querys than just "client=" to restrict your search. But if you use the -r flag, i think that NW will list every saveset available for the current.
I'm running NetWorker on Solaris and have written a script that will do this. If you're running NetWorker on Windows, sorry................
Here it is:
#!/bin/ksh
# Script Name: sizeutil.ksh
# Purpose: Report amount of data backed-up by Legato
#
# Changes:
# Simplify menus
# Show backup level when looking up by specific date and what was backed up by group.
BOLD=`tput smso`
UNBOLD=`tput rmso`
CLIENT ()
{
mminfo -a -r client | uniq
}
#
start_date ()
{
clear
print "The date can be entered in several different forms \n"
#
print "1. TOD. A tod time of day, which is of the form \
hh[:mm[:ss]] (or hhmm) [meridian] [zone]. If no meri\
dian - am or pm - is specified, a 24-hour clock is \
used. A tod may be specified as just hh followed by a \
meridian. If no zone (for example, GMT) is specified, \
the current timezone, as determined by the second \
parameter, now, is assumed. \n"
print "For example: 10:15 am or 23:15 \n"
#
print "2. Date. A Date is a specific month and day, and \
possibly a year. The acceptable formats are mm/dd[/yy] \
and monthname dd [yy]. If omitted, the year defaults to \
the current year. If a year is specified as a number in \
the range 70 and 99, 1900 is added. If a year is in \
the range 00 and 30, 2000 is added. The treatment of \
other years less than 100 is undefined. If a number \
not followed by a day or relative time unit occurs, it \
will be interpreted as a year if a tod, monthname, and \
dd have already been specified; otherwise, it will be \
treated as a tod. \n"
print "For example: 05/15/04 or 03/17 \n"
#
print "3. Relative Time. Specifications relative to \
the current time are also accepted. The format is \
[number] unit; acceptable units are year, month, \
fortnight, week, day, hour, minute, and second. \n"
print "For example: last week or two weeks ago \n"
}
MMINFO1 ()
{
start_date
let "QUIT = `CLIENT | wc -l` + 1"
print "Start Date: \c"
read STARTDATE
PS3="Enter the $BOLD NUMBER $UNBOLD for your client selection or $BOLD $QUIT $UNBOLD to exit this menu: "
select NAME in `CLIENT` "Quit"
do
case $NAME in
Quit)
break
;;
*)
mminfo -a -t "'$STARTDATE'" -c $NAME -r totalsize | awk '{ ssum += $1/1073741824 } \
END { print ssum, "GB" }' | tr -s "." ","
;;
esac
done
}
#
MMINFO2 ()
{
start_date
let "QUIT = `CLIENT | wc -l` + 1"
print "Start Date: \c"
read STARTDATE
PS3="Enter the $BOLD NUMBER $UNBOLD for your client selection or $BOLD $QUIT $UNBOLD to exit this menu: "
select NAME in `CLIENT` "Quit"
do
case $NAME in
Quit)
break
;;
*)
mminfo -a -c $NAME -q "sscreate>=$STARTDATE" -r "totalsize,sscreate" | grep $STARTDATE | awk '{ ssum += $1/107374
1824 } \
END { print ssum, "GB" }' | tr -s "." ","
;;
esac
done
}
#
MMINFO3 ()
{
start_date
print "Start Date: \c"
read STARTDATE
mminfo -a -t "'$STARTDATE'" -r totalsize | awk '{ ssum += $1/1073741824 } \
END { print ssum, "GB" }' | tr -s "." ","
print "1. (R)eturn to main Menu"
print "2. (E)nter new date \n"
print "Please enter your Selection: \c"
read option
case $option in
1|R|r)
show_menu ;;
2|E|e)
MMINFO3
;;
esac
}
#
MMINFO4 ()
{
clear
print "A date is a specific month and day, and \
possibly a year. The acceptable formats are mm/dd[/yy] \
and monthname dd [yy]. If omitted, the year defaults to \
the current year. If a year is specified as a number in \
the range 70 and 99, 1900 is added. If a year is in \
the range 00 and 30, 2000 is added. The treatment of \
other years less than 100 is undefined. If a number \
not followed by a day or relative time unit occurs, it \
will be interpreted as a year if a tod, monthname, and \
dd have already been specified; otherwise, it will be \
treated as a tod. \n"
print "For example: 05/15/04 or 03/17 \n"
print "Start Date: \c"
read STARTDATE
mminfo -a -q "sscreate>=$STARTDATE" -r "totalsize,sscreate" | grep $STARTDATE | awk '{ ssum += $1/1073741824 } \
END { print ssum, "GB" }' | tr -s "." ","
print "1. (R)eturn to main Menu"
print "2. (E)nter new date \n"
print "Please enter your Selection: \c"
read option
case $option in
1|R|r)
show_menu ;;
2|E|e)
MMINFO4
;;
esac
}
#
MMINFO5 ()
{
clear
print "A date is a specific month and day, and \
possibly a year. The acceptable formats are mm/dd[/yy] \
and monthname dd [yy]. If omitted, the year defaults to \
the current year. If a year is specified as a number in \
the range 70 and 99, 1900 is added. If a year is in \
the range 00 and 30, 2000 is added. The treatment of \
other years less than 100 is undefined. If a number \
not followed by a day or relative time unit occurs, it \
will be interpreted as a year if a tod, monthname, and \
dd have already been specified; otherwise, it will be \
treated as a tod. \n"
print "For example: 05/15/04 or 03/17 \n"
let "QUIT = `CLIENT | wc -l` + 1"
print "Start Date: \c"
read STARTDATE
print "END Date: \c"
read ENDDATE
PS3="Enter the $BOLD NUMBER $UNBOLD for your client selection or $BOLD $QUIT $UNBOLD to exit this menu: "
select NAME in `CLIENT` "Quit"
do
case $NAME in
Quit)
break
;;
*)
mminfo -a -q "sscreate>=$STARTDATE,sscreate<=$ENDDATE" -c $NAME -r totalsize | awk '{ ssum += $1/1073741824 } \
END { print ssum, "GB" }' | tr -s "." ","
;;
esac
done
}
#
MMINFO6 ()
{
clear
print "A date is a specific month and day, and \
possibly a year. The acceptable formats are mm/dd[/yy] \
and monthname dd [yy]. If omitted, the year defaults to \
the current year. If a year is specified as a number in \
the range 70 and 99, 1900 is added. If a year is in \
the range 00 and 30, 2000 is added. The treatment of \
other years less than 100 is undefined. If a number \
not followed by a day or relative time unit occurs, it \
will be interpreted as a year if a tod, monthname, and \
dd have already been specified; otherwise, it will be \
treated as a tod. \n"
print "For example: 05/15/04 or 03/17 \n"
print "Start Date: \c"
read STARTDATE
print "END Date: \c"
read ENDDATE
mminfo -a -q "sscreate>=$STARTDATE,sscreate<=$ENDDATE" -r totalsize | awk '{ ssum += $1/1073741824 } \
END { print ssum, "GB" }' | tr -s "." ","
print "1. (R)eturn to main Menu"
print "2. (E)nter new dates \n"
print "Please enter your Selection: \c"
read option
case $option in
1|R|r)
show_menu ;;
2|E|e)
MMINFO6
;;
esac
}
#
MMINFO7 ()
{
clear
print "A date is a specific month and day, and \
possibly a year. The acceptable formats are mm/dd[/yy] \
and monthname dd [yy]. If omitted, the year defaults to \
the current year. If a year is specified as a number in \
the range 70 and 99, 1900 is added. If a year is in \
the range 00 and 30, 2000 is added. The treatment of \
other years less than 100 is undefined. If a number \
not followed by a day or relative time unit occurs, it \
will be interpreted as a year if a tod, monthname, and \
dd have already been specified; otherwise, it will be \
treated as a tod. \n"
print "For example: 05/15/04 or 03/17 \n"
print "Start Date: \c"
read STARTDATE
print "END Date: \c"
read ENDDATE
for i in `CLIENT`
do
print "$i: \c"
mminfo -a -q "sscreate>=$STARTDATE,sscreate<=$ENDDATE" -c $i -r totalsize | awk '{ ssum += $1/1073741824 } \
END { print ssum, "GB" }' | tr -s "." ","
done
print "1. (R)eturn to main Menu"
print "2. (E)nter new dates \n"
print "Please enter your Selection: \c"
read option
case $option in
1|R|r)
show_menu ;;
2|E|e)
MMINFO7
;;
esac
}
#
MMINFO8 ()
{
clear
print "A date is a specific month and day, and \
possibly a year. The acceptable formats are mm/dd[/yy] \
and monthname dd [yy]. If omitted, the year defaults to \
the current year. If a year is specified as a number in \
the range 70 and 99, 1900 is added. If a year is in \
the range 00 and 30, 2000 is added. The treatment of \
other years less than 100 is undefined. If a number \
not followed by a day or relative time unit occurs, it \
will be interpreted as a year if a tod, monthname, and \
dd have already been specified; otherwise, it will be \
treated as a tod. \n"
print "For example: 05/15/04 or 03/17 \n"
print "Start Date: \c"
read STARTDATE
for i in `CLIENT`
do
print "$i: \c"
mminfo -a -q "sscreate>=$STARTDATE" -c $i -r "totalsize,sscreate" | grep $STARTDATE | awk '{ ssum += $1/107374182
4 } \
END { print ssum, "GB" }' | tr -s "." ","
done
print "1. (R)eturn to main Menu"
print "2. (E)nter new dates \n"
print "Please enter your Selection: \c"
read option
case $option in
1|R|r)
show_menu ;;
2|E|e)
MMINFO8
;;
esac
}
#
show_menu ()
{
clear
banner "Size Util"
# sleep 1
# clear
print "\n"
print "Use either the $BOLD NUMBER $UNBOLD or $BOLD LETTER $UNBOLD in '() \n"
print "\n"
print '0) -- (M)enu Display\n'
print '1) -- (A)mount of Data in GB saved for a client from a specific date until now'
print '2) -- am(O)unt of Data in GB saved for a client on a specific date'
print '3) -- amo(U)nt of Data in GB saved for all clients from a specific date until now'
print '4) -- amou(N)t of Data in GB saved for all clients on a specific date'
print '5) -- (G)B of Data saved for a client for a specific Date Range'
print '6) -- G(B) of Data saved for all clients for a specific Date Range'
print '7) -- GB of Data saved for all (C)lients, by client, for a specific Date Range'
print '8) -- GB of Data saved for all c(L)ients, by client, for a specific Date'
print '9) -- (Q)uit this menu'
print "\n";
}
#
show_menu
test choice="0"
while true;
do
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.