1830166 Members
5441 Online
109999 Solutions
New Discussion

tar append backup

 
SOLVED
Go to solution
O'lnes
Regular Advisor

tar append backup

Hello,

Is it possible at all to append the new backup to the end of tape ?
A lot of time I only want backup very few important files and feel it's
really waste to have only a few files on each tape.
Also, after backup entire system on several tapes, it requires to go through
all the tapes to just restore one file if that one is on the last tape.
Andy
17 REPLIES 17
RAC_1
Honored Contributor

Re: tar append backup

it is possible using no-rewind device. But everytime you do a tar you will have to do mt -f /dev/rmt/0mn eof

Regards,
There is no substitute to HARDWORK
Pete Randall
Outstanding Contributor

Re: tar append backup

From man tar:

r Add the named file to the end of the archive. The same
blocking factor used to create the archive must be used to
append to it. This option cannot be used if the archive is a
tape.

So, the answer appears to be that you can append - but not to a tape.

Pete

Pete
melvyn burnard
Honored Contributor
Solution

Re: tar append backup

you do not have to use a no-rewind device, simply use the tar -r option.
From the man page:
r Add the named file to the end of the archive.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
O'lnes
Regular Advisor

Re: tar append backup

how to use the "r" function ?

my statement is " tar -rvf /dev/tape file " ,

but it seems not work,

Andy
Clemens van Everdingen
Honored Contributor

Re: tar append backup

Hi,

Use tar rvf /dev/rmt/xm file



If we made everything clear to You pls assign points.

C.
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
Pete Randall
Outstanding Contributor

Re: tar append backup

The man page seems pretty clear on this. It says, at least the way I read it, that the -r option "cannot be used if the archive is a tape."

Sorry it's not the answer you wanted - maybe look into fbackup.

Pete

Pete
Clemens van Everdingen
Honored Contributor

Re: tar append backup

Pete,

I have read the man page and indeed this comment is there.

But.....

They say sometimes don't try this at home...
In this case I would try, because it really works fine with tape !!

C.
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
Pete Randall
Outstanding Contributor

Re: tar append backup

Clemens, TG,

It would seem that my interpretation of the man page was entirely too literal. From the docs that TG pointed out, it looks like it should work.

I also noted in the fine print of the tar man page, under dependencies, this qualification:

"The r and u function keys are not supported on QIC or 8mm devices."

Pete

Pete
T G Manikandan
Honored Contributor

Re: tar append backup

tar -r option
----
Theory no
practical yes
Clemens van Everdingen
Honored Contributor

Re: tar append backup

Hi,

That it, works like a charm....

C.
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
O'lnes
Regular Advisor

Re: tar append backup

Hello !

Am not able to append to an archive on tape. Using the command:
tar cvf /dev/st0 file1

writes the file1 to the tape. It can be seen using the command:
tar tvf /dev/st0

Using the command:
tar rvf /dev/st0 file2
seems to do something, file2 pops up on screen but
tar tvf /dev/st0
shows that only file1 is on the tape.

file2 does not seem to be written on /dev/st0

Thanks for any help.
Andy
Clemens van Everdingen
Honored Contributor

Re: tar append backup

Hi,

Try this one:

It will work if you have configured just one tape drive on your system:

tar cv file1
tar rv file2

tar tv should give both files in return.

C.
The computer is a great invention, there are as many mistakes as ever, but they are nobody's fault !
Ian Lochray
Respected Contributor

Re: tar append backup

Although tar rv to a tape does seem to work on HP-UX despite what the man page says, you will have to be carefull if you want to port your procedure to other platforms. On AIX, for instance, tar rv to a tape will fail.
Yogeeraj_1
Honored Contributor

Re: tar append backup

try:
tar uvf /dev/st0 file1

tar cvf /dev/st0 file1
will not append
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
melvyn burnard
Honored Contributor

Re: tar append backup

I find this quite strange, as I often used to use the r key to append files to a tar tape backup.
Of course, a workaround would be to create the tar archive on disk, and then append to this archive, and then copy it to the tape using dd.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
melvyn burnard
Honored Contributor

Re: tar append backup

Clarification on the man page entry for the r key:

this man page comment was added due to some less commonly used tape mechanisms
which cannot support append. Append is still supported for tapes on which it has always worked.


So out of interest, which tape drive are you using?
Also what OS, and have you patched the tar coomand?
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!