[Veritas-bu] bplist & '-hoursago'
2005-09-23 15:43:23
If you're going to use the gnu-date command, it'll do math like:
gdate --date="now - 1 day" +%m/%d/%Y
You can then use this to generate your date patterns for start & end time.
-
-----Original Message-----
From: veritas-bu-admin AT mailman.eng.auburn DOT edu
[mailto:veritas-bu-admin AT mailman.eng.auburn DOT edu]On Behalf Of
ida3248b AT post.cybercity DOT dk
Sent: Friday, September 23, 2005 12:12 PM
To: Marianne van den Berg; NBUList (E-mail)
Cc: veritas-bu-admin AT mailman.eng.auburn DOT edu
Subject: Re: [Veritas-bu] bplist & '-hoursago'
Hi
I have found that most NetBackup commands have an undocmented -X option
which allows the use of epoch time for start/end
if you have gnudate installed, you could use something like:
#!/bin/ksh
epochend=`gdate '+%s'`
echo $epochend-86400 | bc | read epochstart
bplist -X -s $epochstart -e $epochend
Regards
Michael
On Fri, 23 Sep 2005 13:26:48 +0200, Marianne van den Berg wrote
> Hi
> I'm not a script writer. I need to run a bplist every morning at 7 (will
do this from cron) for each client to list all files/directories backed up
in the last 24 hours.
> For some or other reason, not all NetBackup commands have the same
options - bplist does not have a '-hoursago', just a start and end date.
> Does anybody have a korn or bourne shell script that can do this?
> THANKS!!
> Marianne van den Berg
--
Cybercity Webhosting (http://www.cybercity.dk)
_______________________________________________
Veritas-bu maillist - Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
|
|
|