I want to thank all that replied to this question, It's great finding out the
nsr_getdate works with nsrmm.
The problem I am having now is when I run the command manualy it works, but
fails when it's executed as part of a korn shell script.
nsrmm -S 1002073857 -e "02/24/04 + 365 days" ------works manualy
But from the script I get:
nsrmm -S $ssid -e \"$sscreate + 365 days\" --actual command in scipt
nsrmm -S 1002073857 -e "02/24/04 + 365 days"
nsrmm: -S and volume names are mutually exclusive
usage: nsrmm [-v | -q] [-s server] [-f device]
or nsrmm -l [-v | -q] [-s server] [-f device] [-myB]
[-e forever] [-c capacity] [-b pool] [-R | volume]
or nsrmm {-u | -j} [-v | -q] [-s server] [-y] [-f device | volume...]
or nsrmm -p [-v | -q] [-s server] [-f device]
or nsrmm -m [-v | -q] [-s server] [-f device] [-r] [volume]
or nsrmm {-d | -o mode} [-v | -q] [-s server] [-Py]
[-S ssid[/cloneid] | -V volid | volume...]
or nsrmm [-s server] -S ssid {-w browsetime | -e retentiontime}
+ [ 1 -ne 0 ]
-----Original Message-----
From: Ed Skolnik Sent: Tuesday, March 30, 2004 3:41 PM
To: 'Legato NetWorker discussion'
Subject: Does any one have some UNIX scripts that can calculate dates in the
future?
Does any one have some UNIX scripts that can calculate dates in the future?
For example In want to change the retention of some savesets to be the "save
set's completion time" plus 1 year.
Mminfo -q'client=something,level=full' -r'ssid,sscomp' | while read ssid
sscomp; do
~~~~~~~~~ calc new date `~~~~~~~~
nsrmm -S $ssid -e ${newdate}
done
Ed
Any views or opinions presented in this email are solely those of the author
and do not necessarily represent those of the company.
Also this message may contain information which may be confidential and
privileged. Unless you are the intended recipient (or
authorized to receive this message for the intended recipient), you may not
use, copy, disseminate or disclose to anyone the message
or any information contained in the message. If you have received the message
in error, please advise the sender by reply e-mail,
and delete the message. Thank you very much.
--
Note: To sign off this list, send a "signoff networker" command via email
to listserv AT listmail.temple DOT edu or visit the list's Web site at
http://listmail.temple.edu/archives/networker.html where you can
also view and post messages to the list.
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
|