Tar command
I am trying to back up some directories on my Red Hat 7.3 system and am having trouble with the tar command. The tap device is /dev/st0 and I am tring to backup the /export/home directory. I also need to be able to set it not to rewind, that is where I am having the problem. The command I am using is:
tar cvf /dev/nrst0 /export/home If I dont use the "nr" it workd fine, but overwrites whatever is on the tape. Thanks for any help Rob |
the command you need is "mt"
mt -f /dev/nrst0 rewind ---> rewind tape mt -f /dev/nrst0 rewoffl ---> rewind & eject tape mt -f /dev/nrst0 fsf ---> skip a file etc. any time you use the /dev/nrst0 (no-rewind) device, the tape stays at the end of the current read/write when the device is closed (e.g. by tar), whenever you use /dev/st0 the device rewinds on close and you are back on the beginning of the tape. |
The /dev/nrst0 doesn't work, I can only get the /dev/st0 to work. and then the tape rewinds and the next day it gets overwriten. I looked at the man pages of the "mt" command and I didn't see how to move the position to the end of the tape so the next tar would append to the tape and not overwrite. Sorry, I very new with Linux, still trying to grasp things.
|
probably "/dev/nrst0" should be "/dev/nst0"
give it a try |
still having problems. when I give the "/dev/nrst0" command all I get is a listing of the directory I am tring to write to tape. I noticed that "st0" and "nrst0" have different attributes:
st0 = crw-rw---- nrst0 = -rw-r--r-- So I am guessing that "nrst0" needs to change somewhat? |
your "/dev/nrst0" is a plain file, you need a "device file"
use "/dev/nst0" instead of "/dev/nrst0" |
All times are GMT -5. The time now is 07:27 AM. |