Sponsored Content
Operating Systems AIX Copying to tape drive throws error Post 302248769 by bakunin on Sunday 19th of October 2008 04:56:16 PM
Old 10-19-2008
Quote:
Originally Posted by vathsan
I ran the below command to copy files within a partition:

svr01:root:/sunfileserver> tar -cvf *
The option "-f" gets a filename as an argument - the file/device where tar is to store the archive. If you enter an asterisk there your declare every file/directory in your current directory (this is what "*" expands to) as a target, not a source. Chances are your never wrote to your tape drive at all. Do the following to write everything in directory /some/start/directory and below to your tape:

tar -cvf /dev/rmt0 /some/start/directory

Alternatively, make this directory your current directory and run tar using a shell glob:

cd /some/start/directory
tar -cvf /dev/rmt0 *

The difference is that in the first case the paths are stored absolutely, n the second case they are stored relatively. If you would list the contents of the archive you would get

/some/start/directory/fileA
/some/start/directory/fileB
/some/start/directory/dirA
/some/start/directory/dirA/fileC
... etc.

In the second case you would get

./fileA
./fileB
./dirA
./dirA/fileC
... etc.

If you intend to restore the archive always into the same directory use the first version with the absolute paths. If you intend to restore the archives into different hierarchies (maybe on another machine where /some/start/directory is named /another/dir) use the second variation.

I hope this helps.

bakunin
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

8mm tape drive I/O error

hello, I don't know what exactly the cause and the solution!! suddenly I receive this error message when I want to use the 8mm tape drive "I/O write error" I disconnect the tape drive and I hook it in another WS and I receive this error :- ... (5 Replies)
Discussion started by: geoquest
5 Replies

2. UNIX for Advanced & Expert Users

Tape Drive error

I have a hp d 350 running on 10.2,im having a problem with the dds2 tape drive whenever i tried backing up larger files...i have remove the tape driver and add it using sam again but still the tape drive is not working .....is there a solution to this problem? # tar cvf /dev/rmt/0m priso.ds a... (3 Replies)
Discussion started by: giriplug
3 Replies

3. Solaris

Error After Installing Tape Drive

Hi, I am a newbie to Solaris, I have a SunFire V120 box, i was trying to install a tape drive(HP SureStore DAT24), i did the install in this manner. # rm -rf /etc/path_to_inst # init 6 later at the "ok" prompt i gave "boot -ar" after doing that it asked me various options i accepted the... (2 Replies)
Discussion started by: rajendra.rait
2 Replies

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

5. Shell Programming and Scripting

Substr throws an ERROR. Any alternatives?

Can somebody please help me to remove the last character of a string.?? I have a string variable, in which I dynamically put values in a for loop.I want to remove the last character from the string. But, the problem is I will not know which character can come in the string (Its inside for... (3 Replies)
Discussion started by: naseert
3 Replies

6. Solaris

Hard Error:DAT Tape Drive

Well I have just added new tape drive to my server (lto) However I am getting few errors in using it. I have checked status with #iostat -En : giving me few hard errors, few soft errors and execution error. Also tape status is not visible as "no sense" its coming as "no additional sense". I... (5 Replies)
Discussion started by: saurabh84g
5 Replies

7. UNIX for Dummies Questions & Answers

scp throws error

My script is like STAMP=$(perl -e '($ss, $mm, $hh, $DD, $MM, $YY) = localtime(time() - 100); printf "%04d%02d%02d%02d%02d", $YY + 1900, $MM + 1, $DD, $hh, $mm') touch $STAMP /sasdata/copydata/ find /sasdata/copydata -type f ! -newer /sasdata/copydata/ -print > output3.txt awk '{print "scp ... (6 Replies)
Discussion started by: tushar_spatil
6 Replies

8. HP-UX

DLT 7000 tape drive failing with "write error on a record in the index"

HP rp5450 (L2000) running HP-UX 11.11B Using DLT 7000 and DLT 4000 tape drives for nightly full backups Backup jobs created by SAM DLT 7000 cron entry is as follows: 00 2 * * 1-6 /usr/sam/lbin/br_backup DLT FULL Y /dev/rmt/0m /var/sam/graphLCAa17036 root Y 1 N > /var/sam/SAM_br_msgs 2>&1... (1 Reply)
Discussion started by: dreh99
1 Replies

9. UNIX for Dummies Questions & Answers

Copying tape-to-tape on UNIX

I am using a 4mm tape to backup my Unix system. However, I wanted to make a copy all of the files and archive headers (or just the archive headers if that's possible) created on one of my tapes to another 4mm tape. I only have one tape drive. Is there a command that will complete such task? ... (1 Reply)
Discussion started by: acoco
1 Replies
PTARGREP(1)						User Contributed Perl Documentation					       PTARGREP(1)

NAME
ptargrep - Apply pattern matching to the contents of files in a tar archive SYNOPSIS
ptargrep [options] <pattern> <tar file> ... Options: --basename|-b ignore directory paths from archive --ignore-case|-i do case-insensitive pattern matching --list-only|-l list matching filenames rather than extracting matches --verbose|-v write debugging message to STDERR --help|-? detailed help message DESCRIPTION
This utility allows you to apply pattern matching to the contents of files contained in a tar archive. You might use this to identify all files in an archive which contain lines matching the specified pattern and either print out the pathnames or extract the files. The pattern will be used as a Perl regular expression (as opposed to a simple grep regex). Multiple tar archive filenames can be specified - they will each be processed in turn. OPTIONS
--basename (alias -b) When matching files are extracted, ignore the directory path from the archive and write to the current directory using the basename of the file from the archive. Beware: if two matching files in the archive have the same basename, the second file extracted will overwrite the first. --ignore-case (alias -i) Make pattern matching case-insensitive. --list-only (alias -l) Print the pathname of each matching file from the archive to STDOUT. Without this option, the default behaviour is to extract each matching file. --verbose (alias -v) Log debugging info to STDERR. --help (alias -?) Display this documentation. COPYRIGHT
Copyright 2010 Grant McLean <grantm@cpan.org> This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.16.3 2013-05-12 PTARGREP(1)
All times are GMT -4. The time now is 01:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy