SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
Using mminfo and grep to find all ...
Author Message
Post Using mminfo and grep to find all ... 
Hi all,
forgive me for being new.
Im using this command to find why our 1 month retention tapes are not going into "recyclable"
mminfo -avot -q volume=1monthtape.00001 -r "savetime(25), sumflags, client,clretent, name, volume, volflags, ssflags"

As it turns out the previous administrator set 6month retention in the wrong pool.
so running the above gives me this (all edited of course...)
12/25/11 23:00:19 server 1 01/25/12 /file 1monthtape.00001
12/26/11 01:45:52 server2 01/26/12 /file 1monthtape.00001
12/26/11 04:04:34 Server 3 06/26/12 /file 1monthtape.00001

So what I want to do is find all servers that are set to go to this 1monthtape pool and identify the server names (server 3 in this case) that are the cause and set up as retention period of 6 months so i can, generate a report for the manager, and then change them over to the proper pool (say 6monthtape pool)

or if there is an easy way from the GUI Smile thanks guys.
PS i just started my job as an analyst dealing with all the backups at work... so sorry for the newbie questions!

View user's profile Send private message
Post Using mminfo and grep to find all ... 
You can do this in the NMC GUI, go to Configuration, select Clients,
then you can right-click on the column headings and add Retention
Policy, then click on that column heading and it will sort the list by
that field...

-----Original Message-----
From: EMC NetWorker discussion [mailto:NETWORKER < at > LISTSERV.TEMPLE.EDU] On
Behalf Of Vygur
Sent: Thursday, February 02, 2012 2:54 PM
To: NETWORKER < at > LISTSERV.TEMPLE.EDU
Subject: [Networker] Using mminfo and grep to find all ...

Hi all,
forgive me for being new.
Im using this command to find why our 1 month retention tapes are not
going into "recyclable"
mminfo -avot -q volume=1monthtape.00001 -r "savetime(25), sumflags,
client,clretent, name, volume, volflags, ssflags"

As it turns out the previous administrator set 6month retention in the
wrong pool.
so running the above gives me this (all edited of course...)
12/25/11 23:00:19 server 1 01/25/12 /file
1monthtape.00001
12/26/11 01:45:52 server2 01/26/12 /file
1monthtape.00001
12/26/11 04:04:34 Server 3 06/26/12 /file
1monthtape.00001

So what I want to do is find all servers that are set to go to this
1monthtape pool and identify the server names (server 3 in this case)
that are the cause and set up as retention period of 6 months so i can,
generate a report for the manager, and then change them over to the
proper pool (say 6monthtape pool)

or if there is an easy way from the GUI Smile thanks guys.
PS i just started my job as an analyst dealing with all the backups at
work... so sorry for the newbie questions!

+----------------------------------------------------------------------
|This was sent by tigurius < at > gmail.com via Backup Central.
|Forward SPAM to abuse < at > backupcentral.com.
+----------------------------------------------------------------------


type "signoff networker" in the body of the email. Please write to
networker-request < at > listserv.temple.edu if you have any problems with this
list. You can access the archives at
http://listserv.temple.edu/archives/networker.html or via RSS at
http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER


via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER

View user's profile Send private message
Post  
Thanks bytes2go, but that's not showing me what im looking for...

View user's profile Send private message
Post Using mminfo and grep to find all ... 
Vygur,
1. You should include (quote) what you are replying to, otherwise it's
out of context and means nothing by itself... (bingo is famous for
this).. as most people subscribe to this as a mailing list and don't see
these in threads...

2. Well I doubt you will find this in the database of backups , I don't
think 'retention period' is kept in the database of backups or indexes,
only the expiration date.

You might want to check out one of the best reporting tools available
for Networker from http://www.tfdconsulting.net/
It might be able to provide what you want...

-----Original Message-----
From: EMC NetWorker discussion [mailto:NETWORKER < at > LISTSERV.TEMPLE.EDU] On
Behalf Of Vygur
Sent: Thursday, February 02, 2012 3:32 PM
To: NETWORKER < at > LISTSERV.TEMPLE.EDU
Subject: [Networker] Using mminfo and grep to find all ...

Thanks bytes2go, but that's not showing me what im looking for...

+----------------------------------------------------------------------
|This was sent by tigurius < at > gmail.com via Backup Central.
|Forward SPAM to abuse < at > backupcentral.com.
+----------------------------------------------------------------------


type "signoff networker" in the body of the email. Please write to
networker-request < at > listserv.temple.edu if you have any problems with this
list. You can access the archives at
http://listserv.temple.edu/archives/networker.html or via RSS at
http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER


via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER

View user's profile Send private message
Post  
"Using mminfo and grep to find all ..."

So let me once again send one of my famous answers ...

The configuration setup is store in the resource file, not in the media index (MI). Policies/periods are stored exclusively here - the MI will only contain absolute days. What you have to find out are the 'groups' or 'clients' assigned to the pool with 'nsradmin'.

Do not forget that you can also set the retention date with the savegrp command. So it is possible that you will not find it within the configuration but within a command/script.

View user's profile Send private message
Post  
Bingo: sorry i think i caused confusion - I know it only shows absolute dates. I'm trying to find the ones where it should be expiring on this specific day but "oh look it's expiring in june!"
for example:
12/25/11 23:00:19 server 1 01/25/12 /file 1monthtape.00001
12/26/11 01:45:52 server2 01/26/12 /file 1monthtape.00001
12/26/11 04:04:34 Server 3 06/26/12 /file 1monthtape.00001


server 3 is expiring june 26 instead of jan 26 like it should. I want it to list those ones basically... - really I'll be able to tell right away if there was a way for me to find anything that is set to expire in june. so lets say I want to find anything backed up in december but is set to expire in june from a particular pool (1monthtape)

View user's profile Send private message
Post Using mminfo and grep to find all ... 
Hi Vygur,

grep may not help much here

If your 1month retention pool contains savesets with a 6-month retention it is
not because the retention is in the wrong pool. The problem is that the
longer 6-month retention was set on the client. Networker applies the longest
of {client-retention, pool-retention}.

You need to look at the retention on the client definition and the pool but if
the configuration has changed, then you will need to analyse some mminfo
output.

- Use mminfo to print client, ssretent and savetime.
- extract the month from both (see below)
- substract savetime from ssretent
- add 12
- calculate the modulus 12 (the result should be 1 for 1-month retention
savesets and 6 for 6-month retention savesets)

How to extract the month from the date using the (korn) shell.

If date="MM/DD/YY" then use:
month=${date%%/*}
to remove everything after the first slash

Example:
+---------------------
$ date="01/31/12"
$ echo ${date%%/*}
01
-------------------------------------+


extract the month from ssretent and savetime on each line of the mminfo output
and substract savetime's MM from ssretent's MM ( the substraction can be
negative, so you need to add 12 and calculate the modulus 12 to get a result
of 1 or 6 -- or else, depending on the retention, but always less than 12 --
assumming that the retention is either 1 or 6 on that 1-month pool)


mminfo -q volume=1monthtape.00001 -r "ssretent,savetime,client" |\
while read ssretent savetime client
do
retent=$(( ( ${ssretent%%/*} - ${savetime%%/*} + 12 ) % 12 ))
echo ${client},${retent}
done


Example: (using a file to simulate mminfo output)

+---------------------
$ cat /tmp/mminfo.txt
07/30/12 01/30/12 client1
12/30/11 06/30/11 client1
03/20/12 02/20/12 client3
08/20/12 02/20/12 client2
12/30/11 11/30/11 client3
01/20/12 12/20/11 client3
06/20/12 12/20/11 client2
12/30/12 06/30/12 client1
05/30/12 11/30/11 client1
05/30/11 04/30/11 client1

$ cat /tmp/mminfo.txt|\
while read ssretent savetime client
do
retent=$(( ( ${ssretent%%/*} - ${savetime%%/*} + 12 ) % 12 ))
echo ${client},${retent}
done
client1,6
client1,6
client3,1
client2,6
client3,1
client3,1
client2,6
client1,6
client1,6
client1,1
----------------------------------------+
(note comma-separated output for your boss)

I don't have a Nw server here and cannot test this with savetimes on the 31st
of a month with the retention on a 30-day month.



If you are using Windows, then you can use -xc, to produce csv output with
mminfo and work the ssretent and savetime substractions within excel.


I hope this may help

jee



On Thursday 02 Feb 2012 11:53:37 Vygur wrote:
Hi all,
forgive me for being new.
Im using this command to find why our 1 month retention tapes are not going
into "recyclable" mminfo -avot -q volume=1monthtape.00001 -r "savetime(25),
sumflags, client,clretent, name, volume, volflags, ssflags"

As it turns out the previous administrator set 6month retention in the wrong
pool. so running the above gives me this (all edited of course...)
12/25/11 23:00:19 server 1 01/25/12 /file
1monthtape.00001 12/26/11 01:45:52 server2 01/26/12 /file
1monthtape.00001 12/26/11 04:04:34 Server 3 06/26/12 /file
1monthtape.00001

So what I want to do is find all servers that are set to go to this
1monthtape pool and identify the server names (server 3 in this case) that
are the cause and set up as retention period of 6 months so i can,
generate a report for the manager, and then change them over to the proper
pool (say 6monthtape pool)

or if there is an easy way from the GUI Smile thanks guys.
PS i just started my job as an analyst dealing with all the backups at
work... so sorry for the newbie questions!

+----------------------------------------------------------------------

|This was sent by tigurius < at > gmail.com via Backup Central.
|Forward SPAM to abuse < at > backupcentral.com.

+----------------------------------------------------------------------


"signoff networker" in the body of the email. Please write to
networker-request < at > listserv.temple.edu if you have any problems with this
list. You can access the archives at
http://listserv.temple.edu/archives/networker.html or via RSS at
http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER


via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER

View user's profile Send private message
Post  
I would not make it too complicated. In general, you want to find out which client has clones which will expire in more than a months.
So i would use a command like:

mminfo -q "pool=clone_pool,clretent>=03/03/2012" -r "client,name,savetime,clretent" -xc, > outfile

and import and filter the result in Excel.

View user's profile Send private message
Post  
Thank you bingo! That helped out quite a bit - I ended up using this and it worked perfectly!

mminfo -avot -q "pool=1mname,clretent>=03/03/2012" -r "savetime(25), sumflags, client,clretent, name, volume, volflags, ssflags" > 1month.txt

View user's profile Send private message
Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB