Capturing information to an output file?

ldmwndletsm

ADSM.ORG Senior Member
Joined
Oct 30, 2019
Messages
232
Reaction score
5
Points
0
Hi, I'm new to this forum, and this may have been discussed many times. I'm also new to TSM. Not sure which section to post this in? This pertains to IBM Spectrum Protect on Linux.

Is there a straightforward method to capture the output from a command run in dsmadmc (e.g. query volume), dsmc, etc?

For example, in the backup world that I come from, I can simply query the database, using the vendor's tool, directly from the Unix prompt, and redirect the output to the usual Unix filtering tools, e.g. sed, awk, grep, sort, etc., thus making it trivial to parse the output. However, I'm unclear on how to do this in the TSM world given that commands are run in these shell style interfaces like dmsc. Maybe it's patently obvious, but I have too much output to sort through manually, and I'd also like to be able to compare output from different runs and/or different volumes, backups, etc.

Thanks :)
 
Hi,
In short, you can.
There are a ton of options.

Admin:
dsmadmc -id=admin -pa=admin 'select * from nodes' | grep -i name

Client:
dsmc q backup "c:\" | find "temp"


All commands you can run from the client or admin can be scripted.
 
To redirect to a file, you do the same as from the OS, you use >. If you want to sort outputs, you can easily do that in dsmadmc if you set the output to comma separated.

From the OS:
dsmadmc -id=admin -pa=admin -comma 'select * from nodes' > output.csv

Or from dsmadmc:
query node > nodes.txt

The output files end up in the working directory of the computer you launched dsmadmc from. For example, I use dsmadmc on my laptop to connect to remote servers, so that's where my output files end up. Some people telnet to the Spectrum Protect Server first, then use dsmadmc there. That's too many steps for me, plus there's no tools on the server to manipulate the output files.
 
Thanks much. When running from the OS, is there a way to obviate passing the password directly on the command line to avoid process visibility/shell history, etc? Does TSM provide any tool for that wherein the password can be passed encrypted?
 
Thanks much. When running from the OS, is there a way to obviate passing the password directly on the command line to avoid process visibility/shell history, etc?
No.

You can use the OC to create a report to run SQL commands and email the results to you, there's no need to pass a password with that.
 
Back
Top