Basics – mminfo, savetime and greater than/less than
Posted by Preston on 2009-02-01
Hi!
The text of this article should be read over at the NetWorker Information Hub.
4 Responses to “Basics – mminfo, savetime and greater than/less than”
Sorry, the comment form is closed at this time.
Top 5 Reflections « NetWorker Blog said
[…] 4 was Basics – mminfo, savetime and greater than/less than. Now, I’m not going to pretend that every person who visited that article was looking for […]
Brett said
Great blog. Lots of good technical networker info. Thanks!
Where is “ago” as in “2 weeks ago” documented? I certainly didn’t see it in nsr_getdate(3).
I believe nsr_getdate mentions relative time is [number] unit.
There also seems to be a difference in the below queries
mminfo -q “pool=pool1, savetime<4 week"
mminfo -q "pool=pool1, savetime<4 week ago"
Preston said
Hi Brett,
It’s certainly referenced in the mminfo documentation; if you check that, you’ll notice it used multiple times in the examples given.
As to the discrepancy you encountered – I’d been using “ago” for so long now that I’ve not run the alternative for years.
Doing a few basic tests, it appears to me that “savetime<X week" actually gets ignored by NetWorker. E.g., here's what I got from:
That’s clearly (as of the time I write this reply) from today. However, if I run it with the “3 weeks ago”, I get what I should get:
So it looks to me that we have an instance of mminfo interpreting “3 week ago” differently to what we’d expect (I.e., it’s coming back as “now”, somehow), but “3 weeks ago” is the correct invocation.
Cheers,
Preston.
Brett said
Hi Preston!
From some testing I did, it looks like “3 week” will be converted to a time 3 weeks in the future of the current time while “3 week ago” will be converted to a time 3 weeks in the past of the current time.
I still think “ago” should be documented in the nsr_getdate(3) man page. A couple of examples in the mminfo(1m) man page isn’t documentation. Even the mminfo man page says time attributes are specified in nsr_getdate(3)
Regards,
brett