Start a Conversation

Unsolved

This post is more than 5 years old

1731

December 11th, 2013 08:00

mminfo command/script

Can someone help me write an mminfo command or script that will look for savesets, with 2 copies....one on disk and one on tape?  Thanks...Jim

4 Operator

 • 

1.3K Posts

December 11th, 2013 08:00

Try this ,

mminfo -avot -q copies=2

--- Original Message ---

10 Posts

December 11th, 2013 08:00

Crazyrov....

True, that will show me ssids with 2 copies.....but, I only want to see those with 2 copies, 1 on tape and 1 on disk.

4 Operator

 • 

1.3K Posts

December 11th, 2013 09:00

OK, might have to segregate them based on the intended pools.

--- Original Message ---

445 Posts

December 12th, 2013 01:00

LaBounty

There are many options to mminfo to try and detail what you need, you may not be able to do in 1 command but it would certainly be possible to identify the copies on tape and disk and then diff the sorted contents against each other.

I would suggest looking at family (disk, tape) or media (device used e.g. LTO, aftd) to see if you can get what you need, in conjunction with ssid you should be able to sort the output to be able to compare.

Something like

mminfo –q copies=2, family=disk –r ssid,savetime –ot > file1

mminfo –q copies=2,family=tape –r ssid,savetime –ot > file2

Then use something to diff the files (kdiff or unix diff tool) depending on your OS. You can also pick specific dates, pools etc to narrow the query.

Regards,

Bill Mason

736 Posts

December 13th, 2013 00:00

Hi,

You can try this - looks like it works to me anyway.  It'll give you a list of the savesets that have copies on two different types of media.  You can adapt the second mminfo command to output whatever you want to find out about these savesets and redirect the list to a file if you wish.

-Bobby

#!/bin/sh

for ssid in `mminfo -av -r ssid -q "copies>1"`

do

mmout=`mminfo -q ssid=$ssid -r family,ssid,client,name | grep -v fmly | sort -u -k 1,1 | wc -l`

if [ $mmout != 1 ] ; then

mminfo -q ssid=$ssid -r ssid,cloneid,client,name,volume,savetime,level,totalsize | grep -v lvl

fi

done

No Events found!

Top