07-11-2008 12:19 PM
Hello,
I would like to restore a folder, but I would like to know the size of this folder prior to restore because of the quota on destination. Is it possible, please?
Any tips, please?
TIA,
cviniciusm.
07-11-2008 12:39 PM
Netbackup does not have this feature. sorry.
07-11-2008 02:23 PM
There is no straight forward way. If you are restoring the whole policy/stream, then you can list the image using bpimagelist command and count how many fragments you have and multiply it with your Fragment size. This can give you idea about the size but keep in mind you this is good only if you are restoring the whole image or else you can use "bplist" command and list the files and then add the bytes for each file you need. In other way run bplist against the client, date and filesystem/directory redirect o/p to a file and then awk on size field and add those numbers.
e.g. for a unix client-
# bplist -B -C <client_name> -t 0 -R -u -l -s 07/10/2008 -e 07/11/2008 / > /tmp/1 (running list from / )
# awk '{print $4}' /tmp/1 > /tmp/2 (this will show the byte size)
now you can take these numbers to excel and do the sum or whichever other way you prefer.
07-13-2008 06:20 PM
Unix can do the sum for you, taked from the last output:
e.g. for a unix client-
# bplist -B -C <client_name> -t 0 -R -u -l -s 07/10/2008 -e 07/11/2008 / > /tmp/1 (running list from / )
# awk '{print $4}' /tmp/1 > /tmp/2 (this will show the byte size)
# awk '{SUM += $4} END{print SUM/1024/1024}'
this last line will give you the total of bytes in MB.
regards
07-16-2008 06:05 AM
We were asked to restore folders that include a date in their names.
We did this via shell script
#!/usr/bin/ksh
for bkdate in `cat /space/dates`
do
bksize=`bplist -C client_name -s 01/01/2004 -e 12/31/2005 -l -R /RUN/files/INPUT/ARCHV_DIR/$bkdate/TAP3 | awk {'print $4'}`
i=0
for sz in $bksize
do
(( i = i + sz ))
done
print "$bkdate, $i" >> /tmp/calc
done