Operating System - HP-UX
1752620 Members
4419 Online
108788 Solutions
New Discussion юеВ

Re: tar file without remove existing data

 
heaman1
Regular Advisor

tar file without remove existing data

I want to use tar command to backup file ,( tar -cvf device file ) , but I found that if I use this command , it will overwrite / remove the existing data in the tape ( the data is created by other tools , not tar ) , can advise how can I keep the existing data if I use tar backup ? thx
12 REPLIES 12
Steven Schweda
Honored Contributor

Re: tar file without remove existing data

1. Use a non-rewinding tape device.

2. If the tape is not at its end-of-tape
position when you want to do the "tar"
operation, then use "mt fsf" to space forward
until it is.

man mt
man 7 mt
Dennis Handly
Acclaimed Contributor

Re: tar file without remove existing data

If you are going to be playing tricky games like this, are you going to remember how to restore the files?
heaman1
Regular Advisor

Re: tar file without remove existing data

thx replies ,

hi Dennis Handly ,

how do you mean ? you mean I may be unable to restore the file if I use this method to backup ? thx
Dennis Handly
Acclaimed Contributor

Re: tar file without remove existing data

>you mean I may be unable to restore the file if I use this method to backup?

No, you can restore your data but only if you remember the series of commands to do so.
mt -f /dev/rmt/0mn fsf
tar -xf /dev/rmt/0mn
James R. Ferguson
Acclaimed Contributor

Re: tar file without remove existing data

Hi:

Tape is so cheap compared to the value of being able to successfully recover a lost or corrupt file. In my opinion, playing tape-positioning games to save few tapes is like playing Russian Roulette with a loaded gun: sooner or later someone loses.

Regards!

...JRF...
Durvesh Mendhekar
Regular Advisor

Re: tar file without remove existing data

Hi,

You can use tar -u command.

regards,
Durvesh
OldSchool
Honored Contributor

Re: tar file without remove existing data

"You can use tar -u command."

I've never tried such and wouldn't recommend it for use with tape anyway (for the reasons noted previously). Also of note was the OP specified the other data on the tape was written by an application other than "tar", so there isn't anything to "update"
Durvesh Mendhekar
Regular Advisor

Re: tar file without remove existing data

Hi,

Use fbackup instead of tar as fbackup have more features.

http://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=663262&admit=109447627+1245161973650+28353475

Regards,
Durvesh
Steven Schweda
Honored Contributor

Re: tar file without remove existing data

> If you are going to be playing tricky
> games [...]

> In my opinion, playing tape-positioning
> games [...]

You know, on VMS, where BACKUP uses _named_
save sets, and offers a /[NO]REWIND
qualifier, people do things like this every
day without a care, and no one thinks that
he's playing any kind of game, tricky or
otherwise. Strange as it may seem.

For example, my nightly incremental backup
tape holds about a month's worth of stuff, so
I don't need to load a new tape daily. And
if I want to see something from last Friday,
I just ask for "I09612".

It'll be a sad day when HP finally completes
the job of killing it off.