ADSM-L

Re: Deleting archive data using command line client

2005-03-23 10:37:50
Subject: Re: Deleting archive data using command line client
From: Richard Sims <rbs AT BU DOT EDU>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Wed, 23 Mar 2005 10:37:24 -0500
On Mar 23, 2005, at 2:01 AM, Jurjen Oskam wrote:

Hi there,

With the GUI-client, you have the option to manually delete archived
data. The GUI presents archived data in packages, sorted by archive
description. I'm using the 5.3 B/A client on an AIX node.

I'd like to delete a whole lot of those packages. Using the GUI is
not practically possible: selecting the first entry and then
shift-click
on the last entry to select it and everything in between doesn't work.
I manually have to select each and every one. Also, I didn't find a way
to select and/or filter on the contents of the description field.

I didn't find a way to accomplish this task using the CLI. Of course,
it's possible to delete archived data using the CLI, but it doesn't
seem to be possible to delete archived packages using a wildcard
pattern
on the archive description.

There are no files in the archived packages, they are all expired (as
intended). Due to a configuration mistake, the directories were bound
to a management class with a much longer archive retention setting, so
they haven't expired yet. Eventually though, they will.

The reason I want do delete these packages is that the GUI
(specifically
the Web client) gets real slow when there are a lot of archived
packages
to choose from.

What I would like to know is how to achieve something like this
(pseudocommand):

dsmc delete archive -des="gl-2004*"

This would then delete all archived data with a matching description,
even when only directories are present in a package.

Hi, Jurjen -

The client Query Archive and Delete Archive commands are happy to
accept wildcards. Formulating the command is, however, something of an
art. To expand upon your pseudocommand above, you would want to first
start with the equivalent query:

  dsmc query archive -des="gl-2004*" -subdir=yes /<FilesystemName>/

(Always first try a query which is comparable to your intended deletion
before attempting the deletion, to verify effect, to avoid unintended
consequences.) This should turn up all files and directories which
employed that Description. Proceeding with the Delete Archive should
then remove all the files and directories. (I have verified that with a
test case which included a wildcarded Description.)

If TSM balks at removing directories which do not have archived files
under them, look into the special CLEAN ARCHDIRectories command (APAR
IX89638).

And, welcome to the more powerful world of CLI operations.  :-)

  Richard Sims        http://people.bu.edu/rbs