1839307 Members
2844 Online
110138 Solutions
New Discussion

tar and fbackup

 
SOLVED
Go to solution
ckchai
Frequent Advisor

tar and fbackup

Hi, I would like to clarify, after I used a tape to backup using tar or fbackup.

Will the content of the tape be overwritten, when I do another backup using the same tape?

the device file i use /dev/rmt/0m.

After one backup, i mount the same tape and do another backup. Will the content of the tape be overwritten or accumulate?
6 REPLIES 6
RAC_1
Honored Contributor

Re: tar and fbackup

Contents will be overwritten. you can use no-rewind device and try doing it with tar and fbackup.

tar -cvf /dev/rmt/0m "some_dir/file"

mt -f /dev/rmt/0mn fsf 1

fbackup -f /dev/rmt/0mn -i "/dir/file"
There is no substitute to HARDWORK
Joseph Loo
Honored Contributor

Re: tar and fbackup

hi,

as mentioned by RAC and others, for tar, u need a no-rewind tape:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=147363

for fbackup, there is no way to append to the archive on a tape since fbackup always rewinds the tape right after opening the device. However, you can restart an fbackup
that was previously interrupted, an operation that appends to an incomplete tape.

regards.
what you do not see does not mean you should not believe
Sivakumar TS
Honored Contributor

Re: tar and fbackup


the answer is YES. the date will be overitten!
Nothing is Impossible !
Adisuria Wangsadinata_1
Honored Contributor
Solution

Re: tar and fbackup

Hi,

The answer is NO for fbackup command, check the url below (docID : UNX1000087) about 'Will fbackup allow you to append to a tape?' :

http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=400000000010776

The answer is YES for tar command, with option 'r'. For example (see the second line) :

# tar cvf /dev/rmt/0m /etc/hosts
# tar rvf /dev/rmt/0m /etc/rc.config.d/netconf

Check the man page of tar for more details.

Check also the url below (docID : CSEG9210081200) about 'How do I append a file to tape using tar?' :

http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000007950095

Hope this information can help you.

Cheers,
AW
now working, next not working ... that's unix
Bill Hassell
Honored Contributor

Re: tar and fbackup

It's important to understand the reason for fbackup's behavior (no appending). Unlike primitive tools like tar and cpio where there is no central index, fbackup finds all the files and directories, then creates an index at the front of the tape. This is identical to commercial backup programs like HP's DataProtector. With this index, you can instantly determine what files were part of the fbackup process. Additionally, this index provides a method for high speed restore (a single file can be restored in a few minutes).

While you can save some money on tapes by appending backups, almost every sysadmin that has been doing this for a while will tell you horror stories about accidents that destroyed all the backups or not counting the number of appended backups correctly and getting the wrong versions, etc. When bad things happen, all the money saved won't help recover the data.


Bill Hassell, sysadmin
Sยภเl Kย๓คг
Respected Contributor

Re: tar and fbackup

Hi,

fbackup cannot append to the tape, always an overwrite. Mr. Bill hassel has clearly explained you why it's so. But with tar utility you can use the same tape multiple times to backup. see man tar.

Regards,
Sunil
Your imagination is the preview of your life's coming attractions