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!

How to attach files to a tape? I backed up some files to a tape

Status
Not open for further replies.

mm8294

MIS
Oct 12, 2001
73
US
using command 'tar -cf ......', and today we need to backup some other files to the end of the same tape. 'tar -cf' won't work because it will rewind the tape first and the files we backed up yesterday will be removed. Could anybody help us to do this?

Thank you so much.
 


hi,


try to use the device with rewind.

ex. instead of using /dev/rmt/0 use /dev/rmt/0n

good luck....
 
the fastest way to rewind the tape without using mt,
from a korn Shell or bourne, just type
# < /dev/rst8

.

Farah regal
good luck
&quot;think twice and hit enter once&quot;
 
You can use ufsdump for backup.
The ufsdump can only backup some files have changed it.You don't worry. Your existing backup will remove it.
Before you used this command :
# ufsdump -9uf /dev/rmt/0 /opt (only backup for some files changed/updated)
You should do the full backup first with this command :
# ufsdump -0uf /dev/rmt/0 /opt (Full backup)
It will be other option for your backup.

 
You need to position the tape to the end of your first save. To do this, use:

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

This positions the tape to the end of your first save. I have assumed here that you have only the one save on the tape at the moment. If there are more, replace 1 with whatever number is appropriate. As mentioned by shadow_eye, the /dev/rmt/0n indicates the no-rewind version of the tape device. Hope this helps.
 
Thank you so much, guys. All messages are very helpful. I will try it tomorrow and hope it works.

Thank you very much again.
 
Guys:

It does not work for me. Below is what I did:

1. insert a new tape.
2. tar cf /dev/rmt/0 file1
3. tar tvf /dev/rmt/0:
> file1
4. mt -f /dev/rmt/0 fsf 1
5. tar cf /dev/rmt/0n file2
6. mt -f /dev/rmt/0 rew
7. tar tvf /dev/rmt/0n:
> file2
8. tar tvf /dev/rmt/0:
> file2

The results are the same even if I skip step 6.

Any suggestion?

Thank you very much.
 
You need to address the tape drive as a non rewind device for each command.
Use /dev/rmt/0n onstead of /dev/rmt/0.
 
As I think Mike is saying, you need to use the no-rewind device (dev/rmt/0cn) in step 4. Cheers.
 
It works! You guys are right!

Thank you so much for all your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top