ADSM-L

Re: dsmc enhancement request

2004-09-17 11:55:40
Subject: Re: dsmc enhancement request
From: "Mueller, Ken" <KMueller AT MCARTA DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Fri, 17 Sep 2004 11:56:02 -0400
This is probably not the most elegant way of doing things, but I think this
will work until your enhancement request is granted! Basically build 2
filelists, sort them together and show only the unique entries that reside
on the client.


#!/bin/sh
#
# Compares TSM filespace to actual filespace
# Displays client files not backed up on TSM
#
# Usage
#   tsmcomp.sh /home/\*
#
echo "Preparing filelist from TSM for $1"
dsmc q backup -subdir=y "$1" | awk 'NR>11 {print "T "
substr($0,index($0,$7))}' > /tmp/tsm.out

echo "Preparing filelist on client for $1"
find $1 -printf "C %p\n" > /tmp/client.out

echo "Comparing filelists..."
sort -k 2 /tmp/tsm.out /tmp/client.out | uniq -u -f 1 | grep '^C' | cut -c
3-


Ken Mueller
Magna Carta Companies

-----Original Message-----
From: Mike [mailto:mikee AT MIKEE.ATH DOT CX]
Sent: Friday, September 17, 2004 8:54 AM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Re: dsmc enhancement request


On Fri, 17 Sep 2004, Richard Sims wrote:

> Interesting propsal, Mike: effectively a -preview mode for Backup.
> Note that, on Unix systems at least, an analogous function may be
> performed via the 'find' command, using a -mtime value relative to the
> last backup time for the filespace, which is granular to 24 hour time
> intervals.  (Finer granularity could be had by using 'find' -mtime and
> -exec, to have a small Perl module do a stat() and test the file's
> last-modified time; or the more ambitious could write it all in Perl
> or C.) But it would take a dsmc facility as you propose to report the
> more interesting case of files now gone from the client which are
> still TSM space.
>
>    Richard Sims    http://people.bu.edu/rbs
>
> On Sep 17, 2004, at 8:04 AM, Mike wrote:
>
> >Since dsmc already knows how to read the local filesystem, how to
> >parse the dsm.opt/dsm.sys/inclexcl.list, and how to talk with the tsm
> >server, please (whomever) enhance dsmc with a switch such that when
> >run on a local node, not with -virtualnodename, the program will load
> >the dsm.opt, scan all local files, and scan the repository, then
> >generate a list to stdout of all files on the local system that do
> >not exist in the repository.
> >
> >Mike
>

I am looking for something more than a -mtime. My concern is a mistake in
the dsm.opt/dsm.sys/inclexcl.list that creates a situation where only
directories are backedup and no files in those directories. I'm not asking
for a list of files that should be backed up now, though I really like that
idea (-preview), what I'm looking for is a set subtraction. Take a list of
all files in the live filesystems, subtract the set of all files within the
TSM repository, then give me the results. I'll look at the results and see
if they are 'resonable' not to be in tsm, or decide that I need to modify my
inclexcl.list, etc.

Mike