• Please help support our sponsors by considering their products and services.
    Our sponsors enable us to serve you with this high-speed Internet connection and fast webservers you are currently using at ADSM.ORG.
    They support this free flow of information and knowledge exchange service at no cost to you.

    Please welcome our latest sponsor Tectrade . We can show our appreciation by learning more about Tectrade Solutions
  • Community Tip: Please Give Thanks to Those Sharing Their Knowledge.

    If you receive helpful answer on this forum, please show thanks to the poster by clicking "LIKE" link for the answer that you found helpful.

  • Community Tip: Forum Rules (PLEASE CLICK HERE TO READ BEFORE POSTING)

    Click the link above to access ADSM.ORG Acceptable Use Policy and forum rules which should be observed when using this website. Violators may be banned from this website. This notice will disappear after you have made at least 3 posts.

Archive report of files just archived?

#1
Hi! This may seem an obvious question I cannot find an answer to. We are just getting started with archiving files, and I'd like to set this up automated. I have the command to run, and it will run each month, but each month I'd like to have it spit out a report of all the files it archived that run? So basically there'd be one file a month generated for each time we run the archive. That file should contain the files archived that month. Can someone help me figure out the syntax needed for that? This is a sample of what I'm running: dsmc archive h:\Archive\Finance\1yr\* -sub=yes -archmc=arc1year -desc='Finance' -optfile=G:\Backup\TSM\BAclient\dsm_fileshare-arc.opt
 

marclant

ADSM.ORG Moderator
#2
Just redirect the output to a file:
dsmc archive h:\Archive\Finance\1yr\* -sub=yes -archmc=arc1year -desc='Finance' -optfile=G:\Backup\TSM\BAclient\dsm_fileshare-arc.opt > output.txt

Or, you can use the options AUDITLOGGINGand AUDITLOGNAME in your command to do this.

Or, if you schedule it from the server, this will be written to the schedlog, you can specify a schedlog for this one, you'd need a 2nd scheduler too to use dsm_fileshare-arc.opt
 

RecoveryOne

ADSM.ORG Senior Member
#4
If you need to query directly from the TSM server, something I whipped up for my auditing needs.
As with most things its its quick and dirty but works decently enough :)
Requires KSH.

Code:
#!/bin/ksh
#Global Variables
TSMADMIN=<Admin_ID>
TSMSE=<server>
TSMPA=<password>

# Function to call tivoli!
tsmcmd() {
    dsmadmc -se=${TSMSE} -id=${TSMADMIN} -pa=${TSMPA} -dataonly=yes "$*"
}


is_node() {
    tsmcmd "q node $x" | grep -q $x
    if [ $? -eq 0 ]; then
        ISNODE="TRUE"
        echo "Node $x is here"
    else
        ISNODE="FALSE"
        echo "Node $x does not exist"
        exit 1

    fi
}


echo "Please enter the node you want archive list for: "
# Read input
typeset -u x
read x
# Null selection, exit
if [ -z "$x" ]; then
    echo "Invalid selection"
    exit 1
fi

is_node "$x"
if [ $ISNODE == "TRUE" ]; then
    tsmcmd "select filespace_name||hl_name||ll_name as \"Full name\" from archives where node_name='$x'" | sed '/^$/d' > $x.archive.txt
    echo "File $x.archive.txt should be created in your cwd."
fi
 

Advertise at ADSM.ORG

If you are reading this, so are your potential customer. Advertise at ADSM.ORG right now.

UpCloud high performance VPS at $5/month

Get started with $25 in credits on Cloud Servers. You must use link below to receive the credit. Use the promo to get upto 5 month of FREE Linux VPS.

The Spectrum Protect TLA (Three-Letter Acronym): ISP or something else?

  • Every product needs a TLA, Let's call it ISP (IBM Spectrum Protect).

    Votes: 14 17.1%
  • Keep using TSM for Spectrum Protect.

    Votes: 52 63.4%
  • Let's be formal and just say Spectrum Protect

    Votes: 9 11.0%
  • Other (please comement)

    Votes: 7 8.5%

Forum statistics

Threads
31,388
Messages
133,702
Members
21,499
Latest member
saivan
Top