Sponsored Content
Full Discussion: multi tape option in tar cmd
Operating Systems Linux Red Hat multi tape option in tar cmd Post 302566424 by Corona688 on Thursday 20th of October 2011 10:33:30 AM
Old 10-20-2011
If your version of tar can read from stdin, you can do something like this to avoid storing hundreds upon hundreds of gigabytes of temporary files:

Code:
# create tapes
mkfifo tarfifo
tar -vcf tarfifo /path/to/files &
PID=$!
N=0
while [ -d /proc/${PID} ]
do
        printf "Insert tape and hit enter " >&2
        read < /dev/tty # Read from terminal, not tarfifo
        dd of=/dev/tape bs=<tape_blocksize> count=<tape_blocks>
        eject_tape
        N=`expr $N + 1`
done <tarfifo

Code:
# extract tapes
mkfifo tarfifo
N=0
while [ -z "$INPUT" ]
do
        dd if=/dev/tape bs=<tape_blocksize> count=<tape_blocks>

        eject_tape

        # Print to stderr, so we don't feed this message into tar!
        printf "Insert tape and hit enter " >&2
        read INPUT
        N=`expr $N + 1`
done | tar -C /path/to/dest/ -xvf -

You could test this with local files instead of tapes by replacing /dev/tape with /path/to/file$N and using a small blocksize and blockcount.

Last edited by Corona688; 10-20-2011 at 11:40 AM..
This User Gave Thanks to Corona688 For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

tar to tape and back

Howdy, 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: ... (6 Replies)
Discussion started by: pmetal
6 Replies

2. UNIX for Dummies Questions & Answers

tar command with compress option...

Hi ! i have to write a script that archivs homes not used since 3 years. First, my script gathers the users that are concerned, using the following command : ll -lt /home/*/.sh_history | egrep '2000|1999|1998|1997' | awk '{print $3}' i obtain a list like this : user_1 user_2 ...... (3 Replies)
Discussion started by: tomapam
3 Replies

3. 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

4. UNIX for Dummies Questions & Answers

Is there nobody who's sucessfully used tar -G option???

Has anyone you know ever used the -G --incremental option successfully with the tar command? I'm not talking about the little -g --listed-incremental option. I don't want incremental backups. Just one differential backup which is what the -G is for. The -G command is supposed to make a single... (1 Reply)
Discussion started by: protienplant
1 Replies

5. Shell Programming and Scripting

tar: unable to specify archive name with -p option

Hi, When I use -p option(preserve permissions) while creating tar archives, it throws error and creates archive in the name of 'p'. But without -p option I am able to create archive name as I mentioned. how do I work it out with --preserve-permissions? Any help is much appreciated. ... (3 Replies)
Discussion started by: learn more
3 Replies

6. Shell Programming and Scripting

tar cmd how many arguments into parameters of filenames

Hi I would like to use tar cmd in my script. I have a variable with filenames, e.g. 1000 records and I would like to paste its values into tar cmd. For this example I used three elements variable strings. strings="file1.txt file2.txt file3.txt" `tar cf file1.tar $strings` Whether... (1 Reply)
Discussion started by: presul
1 Replies

7. Red Hat

Multi OS option

Hi, We will purchase redhat enterprise WS. We want to use Windows and Redhat in same machine. For this purpose , should we buy Redhat with Multi OS option? Or Is it just for virtualization..? (I couldnt be sure) Regards... (3 Replies)
Discussion started by: titanic
3 Replies

8. UNIX for Advanced & Expert Users

Multi-Volume tar archives. [solved]

Hi, The only off-line storage medium I have is DVD. I am trying to back up around 10G of data and if I can achieve a practical solution I will use it more generally. I am currently considering something along the lines of: tar --create --multi-volume --tape-length=nnnn <pathspec> |... (0 Replies)
Discussion started by: MikeGM
0 Replies

9. UNIX for Dummies Questions & Answers

cmd find: exclude directory when using option -depth

hello, i want to use "-depth" in command "find" and want to exclude a directory. the find command should work in HP-UX and Linux. i see in the find man page: -prune If -depth is not given, true; do not descend the current directory. If -depth is given, false; no effect. -depth... (3 Replies)
Discussion started by: bora99
3 Replies

10. Shell Programming and Scripting

Help with tar cmd for directories

Hi, I'm working on HP-UX B.11.23 64bit. I tried to tar couple of directories but failed to do so. $ tar -cvf tar_file_name -C /dir1 /dir2 the -C is for directories as mentioned in the man pages. But still unable to create a tar file having directories and sub-directories. Requesting help in... (1 Reply)
Discussion started by: sam_bd
1 Replies
dda(7D) 							      Devices								   dda(7D)

NAME
dda - MMS disk archiving driver SYNOPSIS
/devices/pseudo/dda@lun:bn DESCRIPTION
The Media Management System (MMS) is a distributed removable media management system based on the IEEE 1244 Media Management System speci- fication. MMS provides a uniform and consistent tape interface to client applications. The dda driver is a pseudo tape drive with filesystem file media. The dda driver is a minimal emulation of the st(7D) tape driver mtio(7I) interface with BSD no-rewind behavior and is used for MMS disk archiving. The dda driver should be used with a MMS MMP mount command han- dle. You configure DDA tapes, drives, and libraries for disk archiving using the mmsadm(1M) command. You also use mmsadm(1M) to mount and unmount dda media. CONFIGURATION
To set the number of disk archiving tape drives available for MMS disk archiving, edit the /kernel/drv/dda.conf configuration file. The default number of disk archiving tape drives is 20. The disk archiving tape drive devlinks are located in the /dev/dda directory. The DDA maximum block size is 262144 bytes and the minimum is 1 byte. FILES
/kernel/drv/dda 32-bit kernel module (x86) /kernel/drv/sparcv9/dda 64-bit kernel module (SPARC) /kernel/drv/amd64/dda 64-bit kernel module (x86) /kernel/drv/dda.conf dda configuration file ATTRIBUTES
See attributes(5) for a description of the following attributes: +--------------------+---------------------------------------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+---------------------------------------------------------+ |Architecture | SPARC, x86 | +--------------------+---------------------------------------------------------+ |Availability | SUNWmmsr | +--------------------+---------------------------------------------------------+ |Interface Stability | Uncommitted | +--------------------+---------------------------------------------------------+ SEE ALSO
mt(1), mmsadm(1M), attributes(5), dmd(7D), st(7D), mtio(7I) IEEE 1244 Removable Media Standards Specification -- IEEE, 2000 SunOS 5.11 17 Oct 2008 dda(7D)
All times are GMT -4. The time now is 10:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy