Operating System - HP-UX
1849376 Members
6242 Online
104044 Solutions
New Discussion

Re: tape backup using tar

 
SOLVED
Go to solution
Steve_3
Frequent Advisor

tape backup using tar

Need help with tape backup using tar. How do I do a stack? When I do "tar cvf /dev/rmt/0m /tmp" it backup the /tmp and rewind. How do I get it not to rewind, b/c I want to contiue backups on the tape.
HP-UX 11.0

Thanks,
Steve
6 REPLIES 6
Rick Garland
Honored Contributor

Re: tape backup using tar

Use the no-rewind device. Example, do the ioscan -fnCtape and this will show the devices. There are other device names associated with the same physical device. One example would be /dev/rmt/0mn. The 'n' is specifing no-rewind.
Rick Garland
Honored Contributor

Re: tape backup using tar

As a note, tar may not be the best choice for doing backups. If using the UNIX utilities, check out cpio or dump. tar is OK but the other utilities are better. Depends on what you are doing...
Tom Danzig
Honored Contributor

Re: tape backup using tar

If you want to add another file or directory to an existing tar tape backup, use the r option for tar. For example:

tar cvf /dev/rmt/0mn /tmp
(note use of no rewind device file)

To add /usr to your /tmp tar backup,

tar rvf /dev/rmt/0mn /usr

Philip Chan_1
Respected Contributor
Solution

Re: tape backup using tar

Hi Tom,

Correct me if I'm not, I thought the "r" flag is no good for tape archives (saw this from man page).

Steve, if I'm correct then you should use the "u" flag instead,

eg. tar uvf /dev/rmt/0m

and I don't suggest you relying on non-reminding device while appending files.

Rgds,
Philip
Andreas Voss
Honored Contributor

Re: tape backup using tar

Hi,

another method is to use the mt command:
mt eod will wind the tape to the last end of data. Then you can append with a new tar command.

Greetings

Andrew
Tom Danzig
Honored Contributor

Re: tape backup using tar

Philip,

Your correct. It should be u, not r.

Tom