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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

tar command

Status
Not open for further replies.

230173

MIS
Jun 22, 2001
208
SG
Can i use "tar uvf" (u!!!) on a tape?
If i look in the man pages it says that u isn't possible for tape devices.
But if i use "tar cvf" i'll have to typ "/dev/rmt1.1 " because otherwise the tape wil be rewinded and all the previous data will be erased.
With the .1 syntax aix will make a whole new archive every time.
The question: How can i write to a tape device without deleting the previous data in 1 archive?
 
You could perhaps use

mt -f [tape device] fsf 1

to position the tape at the end of the first archive, thus preserving the data within it. Then use your tar cvf command to write from that point on.

Hope this helps.
 
so every time you backup data the tape rewinds
and with this command the tape goes to after the last piece of data?
If this is so this would be a long procedure because i have a lot to backup.
 
If you use the non-rewind version of your tape device, you shouldn't have to rewind and fsf the tape each time. I'm afraid tar (at least to my knowledge) doesn't support any fancy dan stuff like saving files incrementally. OK - someone's gonna shoot me down now!

Cheers
 
How about saving data to a file on disk and then tar'ing this off to tape. Then all you need to do is use the -r option to append new information to the end of the file (on disk) before saving this off to tape?

Just an idea...?

Dave Vickers.
 
Hey Why dont you select the file system u want to backup and then give as a listing for the tar to backup

tar -cvf /dev/rmt0 Fs1 fs2 fs3.....etc.

This way it writes sequentially

Hope this helps

Naveen
 
If you want to backup your filesystems , put it in a loop and use the no rewind device , and as long as you know the positions of where your filesystems are it shouldn't be a problem i.e

tctl -f /dev/rmt0 rewind
for I in do df lsvg or whatever to get list of filesystems
do
tar cvf /dev/rmt0.1 $I
done


Then if you want to append to it you can contine writing to it as long as you haven't done a rewind
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top