tar to tape and back

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers tar to tape and back
# 1  
Old 10-31-2001
Question tar to tape and back


I'm trying to tar some directories to tape and then extract them from tape on another machine. I was hoping someone could help me with the syntax of the tar commands. Both machines are running Solaris 8.

Need to get all files and directories under the following:


(some of the sub-directories are symbolic links, not sure if that matters)

Once I have that data on tape, how would I extract it to the second machine?


# 2  
Old 10-31-2001
Lightbulb Re: tar to tape and back

Hi there!!!
First of all, do you want to follow the links or not?

here are my suggestions:
to create your tape:
  • following the links
    cd /
    tar cpvhf `your_tape_device` ./opt/netscape/server4/docs ./opt/coldfusion
  • not following the links
    tar cpvf ./opt/netscape/server4/docs ./opt/coldfusion
Notice that the tar has been created relatively and not absolutely
Once the tape made, on your other system, you can do
  • tar tfv `your_tape_device` to visalize the archived files or
  • cd `your_pwd`;tar xpvf `your_tape_device` to extract your files !
As you can see, you might have to perform a `cd /` if you want your files to be at root...

Hope this will help!

Jason Smilie
# 3  
Old 10-31-2001

Does anyone knows if I can delete the contents of a tape, or it has to be overwritten??

# 4  
Old 10-31-2001
Thanks Jason! I didn't realize the "h" would follow links, so that will definitely help in the future.

thanks again

# 5  
Old 10-31-2001

man tar would also provide you with a lot of information.

# 6  
Old 11-01-2001
if you check man tar, there is not anything about deleting tar files from a tape. Any help would be appreciated ??
Can you erase the contents of a dat tape?

Thanks a lot
# 7  
Old 11-01-2001

try the following command

mt -f /dev/rmt/0 erase

But this will erase the entire contents of the tape catridge
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Back up log files using tar

Hi, I need some help writing a perl script to tar all log file to a directory and then delete the log files. Can some one please help me on this? I m Not very good with perl scripting... Thanks KK (4 Replies)
Discussion started by: karthikk0508
4 Replies

2. Red Hat

Bring tape paths back up in Redhat 5.4

Hi Folks, Looking for some assistance here on a Dell server connected to a Dell tape robot with Redhat 5.4 and Netbackup 6.5. Netbackup thinks the tapes are all present and working, but they are not - we lost the internal encryption keys earlier but think that they are reinstated as the... (0 Replies)
Discussion started by: gull04
0 Replies

3. Solaris

tape tar error

Hi, I am trying to determine if a tape is full because on 2 different tapes, im receiving 2 different kind of errors: # uname SunOS # /bin/tar cvf /dev/rmt/0n /export/home a /export/home/jerry/wlserver_10.0.tar.gz 28528 tape blocks tar: write error: unexpected EOF # mt -f /dev/rmt/0n... (5 Replies)
Discussion started by: mosies
5 Replies

4. UNIX for Advanced & Expert Users

tar and vdump on same tape?

Hello, This might be a dumb question, but I havent been able to find the answer anywhere. I currently have a backup script that uses 'tar' to backup some files to tape. I need to add a directory to the backup script, but I want to use 'vdump' to back it up to tape. So my question is can I... (3 Replies)
Discussion started by: xadamz23
3 Replies

5. UNIX for Advanced & Expert Users

tar: tape blocksize error

Hi, I have tar: tape blocksize error when launching # gunzip < TierDB.tar.gz |tar -xvf /data/ora/DREC tar: tape blocksize error Can you please help me ? It is urgent. Many thanks. (1 Reply)
Discussion started by: big123456
1 Replies

6. Filesystems, Disks and Memory

Can I back up all the files I work with each day using tar?

Can I back up all the files I work with each day using tar? (2 Replies)
Discussion started by: jo calamine
2 Replies

7. UNIX for Advanced & Expert Users

Does tar do crc checking on a tape or tar file?

Trying to answer a question about whether tar table-of-contents is a good tool for verifying tape data. (1 Reply)
Discussion started by: tjlst15
1 Replies

8. SCO

back-up drive : tape error

i have an ibm machine with dds4 drive running sco. i bought new hp dds4 tape for my back-up. the new tapes are not being read by the system, it says tape error, no such device. i've already clean the drive several times but still the same error occur. i've tried to use the same tape on our windows... (3 Replies)
Discussion started by: yackim
3 Replies

9. UNIX for Advanced & Expert Users

tar to remote tape

I tried to buckup some oracle archive logs (from a solaris machine) to a remote tape (in a HP-UX machine). I added the solaris machine name and user to .rhosts, and i tried to use this commande : tar cvf HPhost:/dev/rmt/0mn /u01/* The probleme that it gives: HPhost:/dev/rmt/0mn : No such... (1 Reply)
Discussion started by: lasgaa
1 Replies

10. UNIX for Dummies Questions & Answers

Automatic Tape Back-up under UNIX

Hi guys and gir.. emm hey guys! (only kidding girls) I have been asked to provide a tutorial on how to perform an automatic back up (to tape) for 23 sun sparc workstations networked using an ethernet setup under the UNIX operating system. Sounds easy enough to you... I've never ever seen... (4 Replies)
Discussion started by: maross
4 Replies
Login or Register to Ask a Question