tar to tape drive command


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users tar to tape drive command
# 1  
Old 10-06-2010
tar to tape drive command

I want to use this command to tar to tape:
Code:
tar cf - DIR | compress > `hostname`_`date +%m-%d-%y`.DIR.tar.Z

this of course goes to the FS.

How do I modify this to go directly to tape?

My tape device is /dev/rmt/0

thanks.

Moderator's Comments:
Mod Comment Having so many posts you should be familiar using code tags. You got a PM.

Last edited by zaxxon; 10-06-2010 at 10:37 AM..
# 2  
Old 10-06-2010
What OS?
# 3  
Old 10-06-2010
Code:
tar cvf /dev/rmt/0 DIR

# 4  
Old 10-06-2010
Quote:
Originally Posted by rdcwayx
Code:
tar cvf /dev/rmt/0 DIR

I'll also suggest, provided your tar supports it, adding either -z (gzip) or -Z (compress) to have tar do the compression as it writes.


Code:
tar cvf /dev/rmt/0 -z DIR

# 5  
Old 10-06-2010
find . . . -type f | cpio -oaH crc | gzip -9 | dd (help me here).

Tar used to pad files to block size with nulls, wasted media. Luckily, cpio does not, and this gives you complete control over the compression, and multiprocessing.

What do you do when the tape does not read, which old tape is prone to. I thought everyone had gone dvd and network by now.
# 6  
Old 10-08-2010
Sorry,

Solaris 10 with Trusted Extensions.
# 7  
Old 10-11-2010
IMHO (Hope Im wrong...)I doubt you can give a name+extension AND sent to tape all in one...
Either you create a file you copy after to tape...
or
You pipe to tape (but cannot choose to give a name...)
Code:
tar cf - DIR | compress | dd of=/dev/rmt/0

Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

tar command to explore multiple layers of tar and tar.gz files

Hi all, I have a tar file and inside that tar file is a folder with additional tar.gz files. What I want to do is look inside the first tar file and then find the second tar file I'm looking for, look inside that tar.gz file to find a certain directory. I'm encountering issues by trying to... (1 Reply)
Discussion started by: bashnewbee
1 Replies

2. AIX

savevg/tar/mksysb of server-A on remote tape drive possible ?

Every 3 months we have to do backups (smitth mksysb/lsmksysb + tar) on at least 30 workstations. We have to carry around 2 external tape drives to connect to them. It is a pain to do because it takes at least 3 days to do (evening/night shift) and users sometimes complain that there desk is not put... (1 Reply)
Discussion started by: Browser_ice
1 Replies

3. Solaris

Tar & Tape drive without media

Hi all, I would like to know what would happen if the tape (media) is not placed on the drive and a tar command is executed to backup on the tape. My problem is that tar command hanged for multiple days instead of throwing the error, Is it valid behaviour? I was unable to test the... (4 Replies)
Discussion started by: jmsathish
4 Replies

4. AIX

Tape Drive

I have tape drive in one Lpar. when i saw that time tape is in defined state. After that i deleted the tape drive using the rmdev -R command. Then fired the cfgmgr -v command. But I am not getting the tape drive. Now the drive is even not in defined state also. It is not shown the tape drive. How... (1 Reply)
Discussion started by: pernasivam
1 Replies

5. Solaris

backup through tar command on remote tape

Hello Everybody I have two servers, name A & B. I need to take a backup of one directory(/girish) on serverA. But my tape drive is in serverB through tar command. But when I run the following command it doesn't take the backup. Could any one correct my command to take a backup tar cvf - ... (0 Replies)
Discussion started by: girish.batra
0 Replies

6. Solaris

tar on remote tape drive

hello guys, am trying to save a file file1 to a remote tape drive using tar and i get a permission denied error as shown below: server1%tar cvf - file1 | rsh server2 dd of=/dev/rmt/1m conv=sync a file1 1883905K permission denied since server2 requires login username and password, i see in... (3 Replies)
Discussion started by: nom
3 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. Solaris

Command to determine Tape Drive model and make

Hi, We have some IBM LTO tape drives connect over SAN. I have the following questions :- 1) Command that can list the tape drive details like who is manufacturer, model number, make etc etc 2) I would like to know what are the key differences between IBM LTO Generation 1 and Generation... (5 Replies)
Discussion started by: new2prog
5 Replies
Login or Register to Ask a Question