ADSM-L

Re: dsmc enhancement request

2004-09-17 11:56:31
Subject: Re: dsmc enhancement request
From: "Mueller, Ken" <KMueller AT MCARTA DOT COM>
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