Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

tar cvf /dev/rmt/0cbn rewind or no rewind ?

Status
Not open for further replies.

spneo

Programmer
Aug 16, 2000
5
MY
Hi
I am working on SunOS 5.6

#mt -f /dev/rmt/0cbn status
DLT4000 tape drive:
sense key(0x0)= No Additional Sense residual= 0 retries= 0
file no= 0 block no= 0

with the following scripts :
mt -f /dev/rmt/0cbn rewind
tar cvf /dev/rmt/0cbn /oracle* 2>/home/oracle/oracle.log
tar cvf /dev/rmt/0cbn /data01 2>>/home/oracle/oracle.log
tar cvf /dev/rmt/0cbn /redolog 2>>/home/oracle/oracle.log

1) will /oracle* /data01 /redolog be tar to tape or only /redolog left at the end of the script ?
2) is 2 for error output ? in the above case, will the content of the tar be store to oracle.log or only the error will store to the oracle.log ?
3) is
tar cvf /dev/rmt/0cbn /oracle* /data01 /redolog > /home/oracle/oracle.log 2> oracle.error
recomended instead ?
4) is n in 0cbn stand for no rewind or just a device name ?

Please help
Thank you very much
Neo
 
1) all 3 will be placed onto tape in the order they are backed up ...

the rewind command beforehand will mean that they are also the only things on the tape.

2) 2 is for error output, assuming that you're using sh/bash/ksh or similar oracle.log will only contain errors/output about the tar system (written to stderr ...)

3) nope, probably not.

4) norewind :)
 
Point of order:

mt -f /dev/rmt/0cbn rewind

will have no effect, effectively trying to rewind a non-rewindable device. Cheers.
 
ken is right...
why do you need to rewind ??
enter simply:
tar cfv /dev/rmt/0cb /file1 /file2 /file3 -----------
when they don't ask you anymore, where they are come from, and they don't tell you anymore, where they go ... you'r getting older !
 
rewind _DOES_ work on a no-rewind device ...

no-rewind just means don't rewind when you have finished the current command, which would otherwise be automatic.

if you tar seperately then you can space through to a specific point on the tape.

Code:
mt -f /dev/rmt/0cbn fsf 2

takes you to the 2nd dump on the tape, you couldn't do that easily in one tar file.

i am assuming that the tape is never ejected, and is reused every night to hold a one day working backup of the system. this would explain why the rewind is done, and why the 3 tars are done in the order they are. if this isn't what you want, then your script is wrong :)
 
thats ok, didn't mean to be ott. i guess i just need to calm down a little more when i get in in the mornings :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top