Networker

Re: [Networker] How to trim the index directories

2010-06-04 12:49:27
Subject: Re: [Networker] How to trim the index directories
From: Tim Mooney <Tim.Mooney AT NDSU DOT EDU>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Fri, 4 Jun 2010 11:45:55 -0500
In regard to: Re: [Networker] How to trim the index directories, MIchael...:

What I was
wondering, if there was some way to more robustly delete a range of
savesets, ideally with a single command. And it doesn't sppear to be.

There is, but I really recommend you just stick with nsrim.  You're just
asking for trouble if you start manually purging individual saveset
entries.

I don't need to (nsrim -l cleaned up enough space, and removing the index
folders of non-existent clients freed up even more). But what single
command does that sort of index cleanup?

There isn't a way to do it with a single command (and "robust" wouldn't
be a word I would use with this either), but there are a couple different
ways you could accomplish this with nsrmm.

You need a list of savesets (probably ssid/cloneid actually), so that will
mean some reporting, most likely with mminfo.

Once you have the ssid/cloneids, you have a couple options:

- make NetWorker completely and utterly forget about the saveset by using
  the -d option with nsrmm.  This doesn't just purge the client file index
  entries, it also purges the saveset entry from the media database.  If
  you're saving to tape, the data is still on tape, but NetWorker no
  longer knows it's there.

or

- use the `-o recyclable' option to nsrmm for each saveset, to force
  the saveset to become recyclable, then force an index consistency run
  with nsrim.  This is bypassing the "safety" of using nsrim -l, so you
  can shoot yourself in the foot if you're not careful, but this is one
  way to have a little bit more control on what savesets get purged.

I don't consider doing mminfo looks of savesets to purge to be a single
command;

:-)  It's not a robust method either.  I only mentioned it for
completeness.  I really don't recommend it.

I was wondering if there was a "nsr-cleanup -s 'savetime>1 year'"
kind of command to delete savesets older than 1 year.

There is not, mostly because that kind of thing really depends on what
schedule is in use at a site.  If you do quarterly fulls and the full
for that quarter was 13 months ago, what should the cleanup command do?
If it purges the 13 month old full, then it also must purge all the
savesets that depend on it, so you lose savesets are less than a year old.

Tim
--
Tim Mooney                                             Tim.Mooney AT ndsu DOT 
edu
Enterprise Computing & Infrastructure                  701-231-1076 (Voice)
Room 242-J6, IACC Building                             701-231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164

To sign off this list, send email to listserv AT listserv.temple DOT edu and type 
"signoff networker" in the body of the email. Please write to networker-request 
AT listserv.temple DOT 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