T.R | Title | User | Personal Name | Date | Lines |
---|
485.1 | what is the problem??? | DECWET::EVANS | NSR Engineering | Thu Mar 13 1997 11:46 | 4 |
| is the script placed in /usr/bin (wherever save is)?
is it chmod/chown properly?
what happens that is wrong?
|
485.2 | working ok, but ... | OSL09::NILSTAD | | Thu Mar 13 1997 21:56 | 10 |
| Hi
The script is worink ok, the customer only wants to make sure
that using savefs directly from a script does not cause him
any problems when he wants to restore something.
(The man page for savefs sas that it is not recomende to
use savefs directley ....)
KMN
|
485.3 | ahh, yes. Thank you | DECWET::EVANS | NSR Engineering | Mon Mar 17 1997 11:43 | 13 |
| using savefs "directly" will do exactly what it is advertised to do: save
a filesystem to the NetWorker server.
As files are saved, the info about the file will be logged in the index for the
client doing the savefs. Recovers will read the index first, and allow the
user to select desired files, and perform the recovery.
The "gotcha" is that savefs will not cause the server to save the *index file*
for that client, thus, were *anything* to happen to the index file, recovers
would not be possible, since you cannot copy those index files back from a
save tape!
FYI: this is why savegroup is used.
|
485.4 | save insted of savefs ?? | OSL09::NILSTAD | | Thu Mar 20 1997 11:49 | 7 |
| Hi
Would it help to use save insted of savefs ???
KMN
|
485.5 | no, since savefs fork/exec's save | DECWET::EVANS | NSR Engineering | Thu Mar 20 1997 14:11 | 8 |
| actually, the job of savefs is more of "administration" between savegroup
and save. It responds to the server (savegroup) about those filesystems
that are "local" and need saving. At a later point in time (a few seconds
usually), the server then tells savefs to start a save on a filesystem,
which causes it to exec a save process.
So, no, using save directly won't change the issue about the indexes being
saved.
|
485.6 | | DECWET::FARLEE | Insufficient Virtual um...er.... | Thu Mar 20 1997 15:45 | 17 |
| I must be missing something here.
If the concern is that save/savefs does not "automatically" save the
server's indexes, then why not just (explicitly) save the server's indexes?
Set up a group which contains only the server which is "disabled"
(i.e. the whole savegroup will not be automatically started by NetWorker)
Then, on whatever schedule you wish, run
savegrp -O <group-name>
savegrp -O causes savegrp to save only the indexes for any client in the
group. If it is the server, then the bootstrap save is done.
This is what you want, right?
Kevin
|
485.7 | | DECWET::ONO | Software doesn't break-it comes broken | Fri Mar 28 1997 11:21 | 3 |
| For the script in .0, what saveset(s) are in the client resource?
Wes
|
485.8 | | DECWET::ONO | Software doesn't break-it comes broken | Fri Mar 28 1997 15:03 | 4 |
| Never mind. I was having a problem making the script work, but I
understand now.
Wes
|
485.9 | Indexes | OSL09::NILSTAD | | Wed Apr 02 1997 00:19 | 36 |
| Hi
The script in .0 is a pre/post script, so it is "started" from the
networker server which in this case is atno50, and the client is
stkh02. When running backup (using the script in .0) on stkh02 the
messages on the servere is this:
stkh02.alcatel.no: / level=incr, 10 KB 00:00:15
8 files
stkh02.alcatel.no: /usr level=incr, 241 KB 00:00:38
7 files
stkh02.alcatel.no: /var level=incr, 123 KB 00:00:07
7 files
stkh02.alcatel.no: /home level=incr, 4 KB 00:00:06
3 files
stkh02.alcatel.no: /opt level=incr, 0 KB 00:00:07
0 files
stkh02.alcatel.no: /var/opt/openmail level=incr, 1.9 MB 00:00:12
31 files
stkh02.alcatel.no: /tmp level=incr, 3 KB 00:00:05
2 files
stkh02.alcatel.no: /work level=incr, 0 KB 00:00:04
0 files
atno50.alcatel.no: /index/nsr_031096/index/stkh02.alcatel.no level=9,
170 KB 00:00:29 2 files
It seems to mee that indexes is beeing saved, does't it ???
Regards
Kjell-Magne Nilstad
DIGITAL Norway
|
485.10 | yes, it appears the index is saved. | DECWET::EVANS | NSR Engineering | Fri Apr 04 1997 10:05 | 0 |
485.11 | | KAHLUA::LEMONS | And we thank you for your support. | Fri Apr 11 1997 11:01 | 11 |
| Hi
Sorry to belabor this, but I need to get clearer on two points:
o When I use a pre-/post-processing script, should I be using save or
savefs in that script?
o will either the save or savefs command save the index files, or do I
need to do this manually somehow as part of my script?
Thanks!
tl
|
485.12 | 2 Q = 2 A | DECWET::EVANS | NSR Engineering | Fri Apr 11 1997 15:54 | 13 |
| o When I use a pre-/post-processing script, should I be using save or
savefs in that script?
save
o will either the save or savefs command save the index files, or do I
need to do this manually somehow as part of my script?
you need to save the index manually. At least, according to what I know
(kinda from Legato, etc), although Kjell-Magne Nilstad seems to have
demonstrated otherwise.
Hmmm, guess it's time to play with NSR V4.3...
|
485.13 | ok, ok... here's a test using NSR V4.3 (I finally broke down :-) :-) | DECWET::EVANS | NSR Engineering | Fri Apr 11 1997 16:22 | 59 |
| root@decaf[2]> emacs save-bwe-pre
root@decaf[3]> chmod 777 save-bwe-pre
root@decaf[4]> cat save-bwe-pre
#!/bin/sh
PATH=/sbin:/usr/sbin:/usr/bin
date >> /tmp/bwe-pre.txt
echo "Starting save pre-processing" >> /tmp/bwe-pre.txt
echo $* >> /tmp/bwe-pre.txt
save $*
echo "Completed save pre-processing" >> /tmp/bwe-pre.txt
date >> /tmp/bwe-pre.txt
-----------------------
In server GUI, changed client resource for decaf to have "save-bwe-pre"
in the backup command field, then APPLY.
-----------------------
client is decaf, in group Default, not enabled
server is mrcofe, in group "prod", not enabled
there are 2 mount points: /, and /usr, on decaf
-----------------------
in GUI, Group Control, start now on group Default....
root@decaf[18]> cat bwe-pre.txt
Fri Apr 11 15:06:33 PDT 1997
Starting save pre-processing
-s mrcofe.zso.dec.com -g Default -LL -f - -m decaf.zso.dec.com -t 860796312 -l i
ncr -q -W78 -N /usr /usr
Completed save pre-processing
Fri Apr 11 15:07:13 PDT 1997
Fri Apr 11 15:07:19 PDT 1997
Starting save pre-processing
-s mrcofe.zso.dec.com -g Default -LL -f - -m decaf.zso.dec.com -t 860795196 -l i
ncr -q -W78 -N / /
Completed save pre-processing
Fri Apr 11 15:07:41 PDT 1997
(in GUI, /usr was saved first, then /, and finally index for decaf, then
index for mrcofe)
-----------------------------
in GUI, alter group "prod" to be enabled, thus placing server into an
enabled group.
-----------------------------
Fri Apr 11 15:10:00 PDT 1997
Starting save pre-processing
-s mrcofe.zso.dec.com -g Default -LL -f - -m decaf.zso.dec.com -t 860796393 -l i
ncr -q -W78 -N /usr /usr
Completed save pre-processing
Fri Apr 11 15:10:39 PDT 1997
Fri Apr 11 15:10:40 PDT 1997
Starting save pre-processing
-s mrcofe.zso.dec.com -g Default -LL -f - -m decaf.zso.dec.com -t 860796439 -l i
ncr -q -W78 -N / /
Completed save pre-processing
Fri Apr 11 15:11:07 PDT 1997
(in GUI, /usr was saved first, then /, and finally index for decaf)
|
485.14 | savegroup is the initiator | BACHUS::DEVOS | Manu Devos NSIS Brussels 856-7539 | Sat Apr 12 1997 10:49 | 16 |
| > will either the save or savefs command save the index files, or do I
> need to do this manually somehow as part of my script?
>> you need to save the index manually. At least, according to what I know
>> (kinda from Legato, etc), although Kjell-Magne Nilstad seems to have
>> demonstrated otherwise.
Bruce, I think the index is saved at the initiative of the savegroup.
So, as long as the "save_bwe_pre" command is initiated from the savegrp
command, the index of the client should be saved. And concerning the
index of the NSR server, it depends of the fact that the SERVER client
is in a "enabled" group.
Am I in trouble ?
Manu.
|
485.15 | | DECWET::FARLEE | Insufficient Virtual um...er.... | Mon Apr 14 1997 10:26 | 16 |
| You've got it right.
If the server is part of a savegroup which is enabled (scheduled) for normal
saves, the server's indexes (bootstrap) will be saved as part of that savegroup.
If the server is NOT part of any enabled savegroup, the bootstrap save
will be done any time ANY savegrp is run.
savegrp -o <group-with-server-in-it> is the way to manually trigger saving of
the server's indexes (bootstrap)
If savegrp is never run, the server's indexes are never saved.
Clear?
Kevin
|
485.16 | | SANITY::LEMONS | And we thank you for your support. | Mon Apr 14 1997 13:08 | 35 |
| Hi
I'm using a pre-processing script, and attempting to save to a group
with the name "Testing new clients". It seems that the save command
can not handle group names with spaces in it.
Here's how I'm testing it; I saw that this was the actual command
passed by NetWorker Server V4.2B to this Digital UNIX client:
ksh -v 'nsr_save_test -s nw12780.hlo.dec.com -g "Testing new clients"
-LL -f - -m email1.hlo.dec.com -l full -W78 -N /usr/users /usr/user
Here's the output of the save command:
save $*
+ save -s nw12780.hlo.dec.com -g Testing new clients -LL -f - -m
email1.hlo.dec.com -l full -W78 -N /usr/users /usr/users
new: No such file or directory
clients: No such file or directory
-LL: No such file or directory
-f: No such file or directory
-: No such file or directory
-m: No such file or directory
email1.hlo.dec.com: No such file or directory
-l: No such file or directory
full: No such file or directory
-W78: No such file or directory
-N: No such file or directory
save: SYSTEM error, no group `Testing' configured on server
save: Cannot open save session with nw12780.hlo.dec.com
#
Apparently, since the -g value of 'Testing new clients' is not quoted,
save is getting confused, and the command fails. Any thoughts on this?
Thanks!
tl
|
485.17 | | SANITY::LEMONS | And we thank you for your support. | Tue Apr 15 1997 13:21 | 7 |
| Hi
Are there any other things I can test? Am I doing something obviously
wrong?
Thanks!
tl
|
485.18 | | BRSDVP::DEVOS | Manu Devos NSIS Brussels 856-7539 | Tue Apr 15 1997 14:37 | 6 |
| It is late for me (10:35pm) and I try to remember, but is $@ not
keeping the argument list ?
Thus, maybe you can try " save $@ " ?
Manu.
|
485.19 | oh, ummm, yeah. I was working on this | DECWET::EVANS | NSR Engineering | Wed Apr 16 1997 16:26 | 18 |
| This week has been pretty full so far. I tried duplicating the
situation and was able to. it appears that savegroup is sending
down a quoted string for the group name, and it comes into a shell
as 1 "word" (see man csh, or sh for definition of "word"), but when
I got into trying to make the script execute the save command
using that "word", I discovered it simply comes down to getting that
string parsed by the shell as 1 word, not as multiple words.
in english: if <foo abr bletch> cames in, then you *need* to send
out a command that looks like
save ... -g 'foo abr bletch' ... /path
or not-nice-things happen. So far, I cannot think of a way using csh, sh,
or ksh to do this, since they usually use single quotes (') as a magic
character. Perhaps Perl....
Bruce
|
485.20 | | SANITY::LEMONS | And we thank you for your support. | Wed Apr 16 1997 19:29 | 11 |
| Hi Bruce
First off, I really appreciate the time you spent on this, as I know
you folks are very busy.
But, but, why does save work everynight in my environment with group
names that include spaces, and now won't work in a ksh shell script?
What's different about how save is called in those two cases?
Thanks!
tl
|
485.21 | | SANITY::LEMONS | And we thank you for your support. | Wed Apr 16 1997 20:39 | 118 |
| Hi
I spent another hour on this myself. It gets weirder and weirder. I
modified my script to, instead of using 'save $@', I explicitly
specified all of the needed arguments on the command line; that way,
Ithought I'd get the command shell out of the business of parsing the
command line values. Also, I put quotes around the group name value
before I fed it to save.
It still failed:
email1.hlo# ksh -vx nsr_save_test -s nw12780.hlo.dec.com -g "Testing
new clients" -LL -f - -m email1.hlo.dec.com -l full -W78 -N /usr/users
/usr/users
#!/bin/ksh
#
# -s mrcofe.zso.dec.com -g Default -LL -f - -m decaf.zso.dec.com
# t 860796312 -l incr -q -W78 -N /usr /usr
# EDIT THE FOLLOWING VARIABLE WITH THE VALUE OF THE PARTITION
CONTAINING
# THE MAILWORKS USER AREA.
#
MAILWORKS_USER_AREA=/usr/users
+ MAILWORKS_USER_AREA=/usr/users
#
# Take the arguments passed to the command procedure, and places the
ones
# that are useful into variables.
#
echo "Just before the getopts"
+ echo Just before the getopts
Just before the getopts
while getopts s:g:L:f:m:t:l:qW:N: opt
do
case $opt in
s) SERVER=$OPTARG;;
g) GROUP='"'$OPTARG'"';;
f) FILE=$OPTARG;;
t) TIME=$OPTARG;;
l) LEVEL=$OPTARG;;
W) WIDTH=$OPTARG;;
N) NAME=$OPTARG;;
m) ;;
L) ;;
q) ;;
*) echo "Error: $opt $OPTARG";;
esac
done
+ getopts s:g:L:f:m:t:l:qW:N: opt
+ SERVER=nw12780.hlo.dec.com
+ getopts s:g:L:f:m:t:l:qW:N: opt
+ GROUP="Testing new clients"
+ getopts s:g:L:f:m:t:l:qW:N: opt
+ getopts s:g:L:f:m:t:l:qW:N: opt
+ FILE=-
+ getopts s:g:L:f:m:t:l:qW:N: opt
+ getopts s:g:L:f:m:t:l:qW:N: opt
+ LEVEL=full
+ getopts s:g:L:f:m:t:l:qW:N: opt
+ WIDTH=78
+ getopts s:g:L:f:m:t:l:qW:N: opt
+ NAME=/usr/users
+ getopts s:g:L:f:m:t:l:qW:N: opt
#
# If this execution is saving the MAILworks user area, then shutdown
MAILworks
#
if [[ $LEVEL = full && $MAILWORKS_USER_AREA = $NAME ]]
then
#/usr/opt/DMW/bin/stopMAILworks
echo 'Stopping MAILworks Server'
fi
+ [[ full = full ]]
+ [[ /usr/users = /usr/users ]]
+ echo Stopping MAILworks Server
Stopping MAILworks Server
#
# Execute the NetWorker save command to backup the saveset [=partition]
to the
# NetWorker server.
#
#save $*
save -s $SERVER -g $GROUP -LL -f $FILE -t $TIME -l $LEVEL -W $WIDTH -N
$NAME
+ save -s nw12780.hlo.dec.com -g "Testing new clients" -LL -f - -t -l
full -W 78 -N /usr/users
new: No such file or directory
clients": No such file or directory
-LL: No such file or directory
-f: No such file or directory
-: No such file or directory
save: invalid time specification: "-l"
#
# If this execution is saving the MAILworks user area, then startup
MAILworks
if [[ $LEVEL = full && $MAILWORKS_USER_AREA = $NAME ]]
then
#/usr/opt/DMW/bin/startMAILworks
echo 'Starting MAILworks Server'
fi
+ [[ full = full ]]
+ [[ /usr/users = /usr/users ]]
+ echo Starting MAILworks Server
Starting MAILworks Server
# End of procedure nsr_save_mailworks
email1.hlo#
Note that even though I pass 'save -s nw12780.hlo.dec.com -g "Testing
new clients" . . .', I still see errors from save that it is unable to
correctly parse the group. So, since this data is echoing correctly in
ksh when the save command is processed, why can't save pick up the
values correctly?
Whats' different about calling save from a shell script that isn't done
when save is called by NetWorker in the 'usual way'?
Thanks very much!
tl
|
485.22 | It's a quoting problem... | BACHUS::DEVOS | Manu Devos NSIS Brussels 856-7539 | Thu Apr 17 1997 03:55 | 20 |
| Hi,
I think you misplaced the quotes ("). You placed it such that they are
included in the variable $GROUP in the getopts routine:
g) GROUP='"'$OPTARG'"';;
For me, you should remove it from that place and simply change the line
where you have the save from:
save -s $SERVER -g $GROUP -LL -f $FILE -t $TIME -l $LEVEL ......
to:
save -s $SERVER -g "$GROUP" -LL -f $FILE -t $TIME -l $LEVEL ......
This is my suggestion,
Best Regards, Manu.
|
485.23 | | SANITY::LEMONS | And we thank you for your support. | Thu Apr 17 1997 09:42 | 32 |
| Hi Manu
Yippee! That was it! When I quoted $GROUP on the save command line,
save accepted the data:
save -s $SERVER -g "$GROUP" -LL -f $FILE -l $LEVEL -W $WIDTH -N $NAME
+ save -s nw12780.hlo.dec.com -g Testing new clients -LL -f - -l full
-W 78 -N /usr/users
email1.hlo#
So, it appears that using:
save $@
does not work, but using:
save -s "$SERVER" -g "$GROUP" -LL -f "$FILE" -l "$LEVEL" -W "$WIDTH" -N
"$NAME"
will. Is this a bug?
Final questions:
o is it a problem that I specify in my scripts the actual command
attributes, rather than allowing 'save $@' to just figure it out?
o what is the complete list of attributes that I should specify to save
in these scripts?
Thanks again!
tl
|
485.24 | | BACHUS::DEVOS | Manu Devos NSIS Brussels 856-7539 | Thu Apr 17 1997 12:01 | 10 |
| Happy to help you!
Is it a bug ? - No, certainely not. It is true since the first bourne
shell and accross all the other.
For you other question, No you should not use $@, it was only a
suggestion, and concerning the save, you do like you want.
Manu.
|
485.25 | | SANITY::LEMONS | And we thank you for your support. | Thu Apr 24 1997 18:00 | 23 |
| Hi
The script presented in 485.0 contains the following:
if [ $LEVEL = "full" ]; then
savefs -s $SERVER -g $GROUP -l $LEVEL /
savefs -s $SERVER -g $GROUP -l $LEVEL /usr
.
.
else
savefs -s $SERVER -g $GROUP -l $LEVEL -t $TIME /
savefs -s $SERVER -g $GROUP -l $LEVEL -t $TIME /usr
.
.
fi
Is NOT specifying '-t {time}' a requirement for running a full backup,
or will it work okay (ignore it) if specified on a 'save' command?
I'd like to do without it if possible; less coding machinery, etc.
Thanks!
tl
|
485.26 | i think -l full == -t epoch (01/01/1969 00:00) | DECWET::EVANS | NSR Engineering | Thu Apr 24 1997 18:50 | 0 |
485.27 | I think -l full == -t epoch (01/01/1970 00:00) :-) | BACHUS::DEVOS | Manu Devos NSIS Brussels 856-7539 | Fri Apr 25 1997 04:13 | 1 |
|
|
485.28 | | SANITY::LEMONS | And we thank you for your support. | Fri Apr 25 1997 07:51 | 20 |
| Thanks. I interpret the two previous replies to mean that I can use
the -t option on save when -l is 'full'. True?
Next question: in .0, I see:
while getopts s:g:L:f:m:t:l:qW:N: opt
Is having 'qW', instead of 'q:W', a typo or a feature? That is, should
the command be:
while getopts s:g:L:f:m:t:l:q:W:N: opt
The above command is what my script has currently, and I'm noticing
that save seems to report every file it saves (which is not what I
want).
Thanks!
tl
Thanks!
tl
|
485.29 | | SANITY::LEMONS | And we thank you for your support. | Fri Apr 25 1997 10:01 | 65 |
| Re .26 and .27
When this command:
-s nw12780.hlo.dec.com -g Testing new clients -LL -f - -m
email1.hlo.dec.com -l full -q -W78 -N / /
is fed to my command procedure, which contains:
while getopts s:g:L:f:m:t:l:q:W:N: opt
do
case $opt in
s) SERVER=$OPTARG;;
g) GROUP=$OPTARG;;
L) ;;
f) FILE=$OPTARG;;
m) MASQUERADE=$OPTARG;;
t) TIME=$OPTARG;;
l) LEVEL=$OPTARG;;
q) ;;
W) WIDTH=$OPTARG;;
N) NAME=$OPTARG;;
*) echo "Error: $opt $OPTARG";;
esac
done
save -s "$SERVER" -g "$GROUP" -LL -f "$FILE" -m "$MASQUERADE" -t
"$TIME" -l "$LEVEL" -W "$WIDTH" -N "$NAME" "$NAME"
I see this message in /logs/messages:
Apr 24 20:13:18 robot1 crsupp: --- Successful Save Sets ---
Apr 24 20:13:18 robot1 crsupp:
Apr 24 20:13:18 robot1 crsupp: * email1.hlo.dec.com:/ save: saving
files modifie
d since Thu Apr 24 00:00:00 1997
Apr 24 20:13:18 robot1 crsupp: * email1.hlo.dec.com:/ /dev/null
Apr 24 20:13:18 robot1 crsupp: * email1.hlo.dec.com:/ /dev/tty
Apr 24 20:13:18 robot1 crsupp: * email1.hlo.dec.com:/ /dev/ptyp1
Apr 24 20:13:18 robot1 crsupp: * email1.hlo.dec.com:/ /dev/ttyp1
Apr 24 20:13:18 robot1 crsupp: * email1.hlo.dec.com:/ /dev/ptyp3
Apr 24 20:13:18 robot1 crsupp: * email1.hlo.dec.com:/ /dev/ttyp3
Apr 24 20:13:18 robot1 crsupp: * email1.hlo.dec.com:/ /dev/
Apr 24 20:13:18 robot1 crsupp: * email1.hlo.dec.com:/ /etc/ntp.drift
Apr 24 20:13:18 robot1 crsupp: * email1.hlo.dec.com:/ /etc/
Apr 24 20:13:18 robot1 crsupp: * email1.hlo.dec.com:/ /
Apr 24 20:13:18 robot1 crsupp: * email1.hlo.dec.com:/
Apr 24 20:13:18 robot1 crsupp: email1.hlo.dec.com: / level=full, 11
KB 00:00:1
2 10 files
I checked the file index, and only these 10 files were stored. So it
appears that:
1) a full backup does not send a -t option to the save command
2) the full backup assumes it should do an inc since the previous
midnight, when fed '-t 0'
So, it seems that two different save commands are required, one with -t
(for incs) and one without the -t (for fulls).
Thoughts?
Thanks!
tl
|
485.30 | man ksh explains | DECWET::EVANS | NSR Engineering | Thu May 01 1997 15:29 | 1 |
| If a letter is followed by a :, that option is expected to have an argument.
|