Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Backup Size

Status
Not open for further replies.

alsnafe911

IS-IT--Management
Jun 9, 2002
28
QA
Can any one tell me how do you know how much data you backed up?
 
You can create reports with the mminfo command:
<CMD>

mminfo -s %backupserver% -av -t&quot;1 week ago&quot; -r&quot;Client, pool, savetime, name, sumsize&quot; > backup.txt

This report will generate a list of all sumsizes of all the CLients for the last week.

you can minimize your reprot with the option &quot;-q&quot; (query)

-q &quot;client=&quot;clientname&quot;, pool=&quot;poolname&quot;&quot; ....

now you can built a Program (BASIC, VB, VBA) thats sort your report, to get the information in the right format.



 
bw78
Thank you for your prompt response...what i do now is to go to the Logs folder under NSR and opens the savgroup.log which gives me how the backup went but it doesnt tell the Backup size and honestly iam not a Guru in programming so if you can help me on that plz
 
I´m not good in programming, but it works ;)

You need
1. Computer with LN Client installtion and
premissions.

2. MS-Dos for the Batch Programm.

3. Sax Basic Engine 6 (compatible with VB and VBA i think)

Create a Folder
in this folder are only two scripts and one bg.bmp
mminfo.cmd (Batch-Script)
usage.sba (SAX BASIC Script)
bg.bmp ´Background for Table in HTML - Outputfile

These Scripts will generate HTML files in the Pool-Folders
Good Luck.
If you need Help, u can contact me.
Bastian.Winkler@t-online.de



----- mminfo.cmd -----

REM if exist or not exist delete all Pool-Folders
REM Pool1 - 4 are Poolnames from Legato (Default)

deltree /y Pool1
deltree /y Pool2
deltree /y Pool3
deltree /y Pool4

Rem Pipe all Reports of &quot;mminfo&quot; in one file
Rem don´t forget to set the -t option

d:\Programme\nsr\bin\mminfo -s mapsbackup -t&quot;13 days ago&quot; -r&quot;savetime,space(10),pool,space(10),client,space(20), sumsize,space(10), level,space(10),name,space(10),volume&quot; -q&quot;pool=&quot;Pool1&quot;&quot; >size.txt
d:\Programme\nsr\bin\mminfo -s mapsbackup -t&quot;13 days ago&quot; -r&quot;savetime,space(10),pool,space(10),client,space(20), sumsize,space(10), level,space(10),name,space(10),volume&quot; -q&quot;pool=&quot;Pool2&quot;&quot; >>size.txt
d:\Programme\nsr\bin\mminfo -s mapsbackup -t&quot;59 days ago&quot; -r&quot;savetime,space(10),pool,space(10),client,space(20), sumsize,space(10), level,space(10),name,space(10),volume&quot; -q&quot;pool=&quot;Pool3&quot;&quot; >>size.txt
d:\Programme\nsr\bin\mminfo -s mapsbackup -t&quot;119 days ago&quot; -r&quot;savetime,space(10),pool,space(10),client,space(20), sumsize,space(10), level,space(10),name,space(10),volume&quot; -q&quot;pool=&quot;Pool4&quot;&quot; >>size.txt

Rem Start the usage.sba

D:\WINNT\System32\SaxAuto.exe /run &quot;usage.sba&quot;

--- END OF Batch-File ----





--- usage.sba ---

Sub Main

poolname$=&quot;Pool.txt&quot;
Open poolname$ For Output As #1
Close #1

Open poolname$ For Append As #1
Print #1, &quot;POOL1&quot; ´set the Poolname u need !!!
Print #1, &quot;POOL2&quot; ´set the Poolnames u need !!!
Print #1, &quot;POOL3&quot; ´set the Poolnames u need !!!
Print #1, &quot;POOL4&quot; ´set the Poolnames u need !!!
Close #1

mminfo$=&quot;size.txt&quot;

menue$=&quot;menue.html&quot;
Open menue$ For Output As #1
Print #1, &quot;<html>&quot;
Close #1

Dim PN As Variant

Open Poolname$ For Input As #1


Do While Not EOF(1)
Line Input #1, rec$
PN = rec$
Debug.Print PN

MkDir PN


Open mminfo$ For Input As #2

Do While Not EOF(2)
Line Input #2, rec$

If Not InStr(rec$,PN) = 0 Then

Monat = Mid$(rec$,2,2)
Tag = Mid$(rec$,5,2)
Jahr = Mid$(rec$,8,2)

Open PN & &quot;\&quot; & Jahr & Monat & Tag & &quot;.txt&quot; For Append As #3
Print #3, rec$
Close #3

End If

Loop
Close #2

Dim Sum As Long

usage$ = &quot;usage&quot; & PN & &quot;.html&quot;

Open menue$ For Append As #6
Print #6, &quot;<a href=&quot; & PN & &quot;\&quot; & usage$ & &quot;>&quot; & PN & &quot;</a><br>&quot;
Close #6


ChDir PN



Open usage$ For Output As #4
Print #4, &quot;&quot;
Close #4

Open usage$ For Append As #4
Print #4, &quot;<body bgcolor=FFFFFF text=000080 STYLE=font-family:Arial>&quot;
Print #4, &quot;</table><p align=left><table border=0 height=100 background=bg.bmp cellpadding=0 cellspacing=0><tr valign=bottom>&quot;
Close #4


F$ = Dir$( &quot;*.txt&quot;)
While F$ <> &quot;&quot;



totalsize = 0
Sum = 0
Open F$ For Input As #4

Do While Not EOF(4)

Line Input #4, rec$

If Not Mid$(rec$,76,4)=&quot;&quot; Then

totalsize= Mid$(rec$,76,4)

Debug.Print totalsize
Debug.Print Mid$(rec$, 81,2)

If Mid$(rec$, 81,2) =&quot; B&quot; Then
totalsize = totalsize / 109051904
End If

If Mid$(rec$, 81,2) =&quot;KB&quot; Then

totalsize = totalsize / 106496
End If

If Mid$(rec$, 81,2) =&quot;MB&quot; Then
totalsize = totalsize / 1024
End If

If Mid$(rec$, 81,2) =&quot;GB&quot; Then
totalsize = totalsize
End If


Sum = Sum + totalsize


Monat = Mid$(rec$,2,2)
Tag = Mid$(rec$,5,2)
Jahr = Mid$(rec$,8,2)
If Weekday(Tag &&quot;/&quot; & Monat &&quot;/&quot;& Jahr) = 1 Then wt = &quot;So. &quot;
If Weekday(Tag &&quot;/&quot; & Monat &&quot;/&quot;& Jahr) = 2 Then wt = &quot;Mo. &quot;
If Weekday(Tag &&quot;/&quot; & Monat &&quot;/&quot;& Jahr) = 3 Then wt = &quot;Di. &quot;
If Weekday(Tag &&quot;/&quot; & Monat &&quot;/&quot;& Jahr) = 4 Then wt = &quot;Mi. &quot;
If Weekday(Tag &&quot;/&quot; & Monat &&quot;/&quot;& Jahr) = 5 Then wt = &quot;Do. &quot;
If Weekday(Tag &&quot;/&quot; & Monat &&quot;/&quot;& Jahr) = 6 Then wt = &quot;Fr. &quot;
If Weekday(Tag &&quot;/&quot; & Monat &&quot;/&quot;& Jahr) = 7 Then wt = &quot;Sa. &quot;


Else
End If

Loop


tableh=Sum/10
tableh=tableh + 0.49
tableh=Round(tableh)*2


link=CurDir() & &quot;\&quot; &f$

Open usage$ For Append As #5
Print #5, &quot;<td><table border=1 cellpadding=0 cellspacing=1><td bgcolor=aa0000>&quot; & &quot;<a href=&quot; & link &&quot; target=_new><img alt=&quot;&quot;&quot; & wt & Tag & &quot;/&quot; & Monat & &quot;/&quot; & Jahr & &quot; &quot; & Sum & &quot; GByte&quot;&quot;&quot; & &quot;height=&quot; & tableh & &quot; width=5 border=0></a></td></Table></td>&quot;
Close #5

Close #4

F$ = Dir$()

Wend

Open usage$ For Append As #5
Print #5, &quot;<p align=center><b>&quot; & PN & &quot;</b>&quot;
Close #5
ChDir &quot;..&quot;
FileCopy &quot;bg.bmp&quot;, PN & &quot;\bg.bmp&quot;

Loop

Close


Rem *******************************************************************
Rem *******************************************************************



End Sub


---- END of USAGE.SBA -----
 
Hello,
Just wanted to point out a feature (bug) with mminfo. I have noticed that duplicate lines are produced when a client has had a lot of data backed up and it spans multiple volumes. The only way I've found to get around the reporting problem is by piping the output to 'sort -u' (for HPUX) which will display only the unique lines of output. Not sure what you could use in a Windows environment.
I hope this helps.
ks
 
i know the Problem.
I think with the query option sumsize instead of totalsize you have the same result.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top