Luis Miguel R. wrote:
<snip>
One could conceivably write a script to gather the information from the
summary files and post that information in an html-viewable format. The
question I have is...what is the best piece of information out of the
summary file to grab if one is trying to calculate the size of an image?
Hi, isnt a "du -bsc" accurate?
Consider the following summary of thoughts which is the result of a
discussion from the #Dirvish IRC channel. Apply the concepts to your
situation.
------
Just running a 'du' in a vault doesn't ensure that the vault sizes will
be calculated correctly.
With the number of hard links across the images, 'du' can be told to not
count the disk space of a file the data to which that hard link refers
has already been counted somewhere else. The effect this has on trying
to ascertain the disk space savings that one would gain by removing an
image is as follows.
JUST PLAIN DU.
Running 'du' will get you a list of directory sizes...but in an order of
"du's" choosing. This means that the FIRST directory processed will
be calculated with the FULL backup size because it is the first to have
it's hard links calculated. The second directory to get processed by
du will reuse any hard links that have already been calculated. The
difference in file size is not necessarily the size of that image's
backup, but rather just a difference in size BETWEEN THOSE TWO images.
The subsequent images that are produces are then merely images that have
a size 'differential' to the ones previously processed.
RUN DU ON A FORWARD SORTED DIRECTORY LIST
Consider the following command:
du -csmh `ls -1` --exclude=dirvish
#du -"grand_total_Count" "with_Summary_only" \
"using_Megabyte_numbers" "in_Human_readable_format" \
`and do the du with a directory LiSting -1stcolumn_only` \
--oh_and_EXCLUDE=the_DIRVISH_directory
When this command is run, 'du' will use the results of a sorted
directory listing of the vault (excluding the dirvish config directory)
to process the directories in order -- oldest to newest. This will
give you an ordered representation of the size of the images based on
the prior image.
RUN DU ON A REVERSED SORTED DIRECTORY LIST
Adding the -r option to the 'ls' command will reverse sort the images in
the tree showing you the size of the latest image first with the size of
previous backup images in relation to the newest backup. This might be
less useful except in the case where one wanted to find out the current
backup size. In this case, a simple 'du -csmh $IMAGENAME' would suffice.
Other methods to calculate the size of each image would be to pull the
results from the log.gz file in each image.
<snip the rest about extracting and formatting results from the log.gz
files>
--
Richard
_______________________________________________
Dirvish mailing list
[email protected]
http://www.dirvish.org/mailman/listinfo/dirvish