copy to tape notworking

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting copy to tape notworking
# 1  
Old 12-03-2002
Java copy to tape notworking

I am copying a file to tape but it keeps failing, can any body help?
I tried the tar,cp, mv commands and not seems to be working

# Return Codes
# 0 - success
# 1 - failure


dat=`date +%y%m%d`

cp /u07/work/theo_test.log /dev/rmt0/exp_dump.${dat}.$$
if (( ${?} != 0 ))
echo "move to tape for oracle exp_dump.${dat}.$$ failed" > /u07/work/temp.$$
mailx -s "MOVE OUTPUT FOR ORACLE failed"< /u07/work/temp.$$
return 1

return 0


cp: /dev/rmt0/exp_dump.021203.55874: A parameter must be a directory.


# 2  
Old 12-03-2002
Your main problem is the name of your tape drive. You can't get it a random name as you are doing. You didn't tell what system you are using so I can't tell you the name of your tape drive. But it is probably something like: /dev/rmt/0m. It will already exist and you can do an ls -l on it.

You cannot give the resulting tape a "name" like you can a disk file.

And switch back to a program like tar that is tape-drive aware. Don't cp to a tape drive.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to copy a 2 Volume mksysb backup to a single tape?

Hi, I have an mksysb backup which consists of 2 Volume, how do I combine it into a single Volume or tape ? Appreciate it (1 Reply)
Discussion started by: AIXBlueCat
1 Replies

2. AIX

How to make a copy of a tape to another tape?

Hello, We need to make a copy of a backup tape, using the 2 tape recorders in IBM 3582 Tape Library We tried tu use "tcopy", it seems to work fine (no error messages) but we aren't sure if we can rely on it. my question is how to check if the copy succeded or not, but i also want to know... (3 Replies)
Discussion started by: fastlane3000
3 Replies

3. UNIX for Dummies Questions & Answers

Copy file from a backup tape

I have several files that I need to get off of a backup tape. I'm using AIX 4.3 (I know this is old) and our backups are done using the bru command. I need to copy these files to a specific location, and not restore them to the original location. Can anyone tell me what command I should use to do... (4 Replies)
Discussion started by: troy
4 Replies

4. UNIX for Dummies Questions & Answers

Copy data from tape in unix

Dear sir/madam Could you tell me how to copy or get data from tape to any folder in unix? Thanks, (2 Replies)
Discussion started by: seyha_moth
2 Replies

5. AIX

How to copy a tape into another tape ?

I am new to AIX. I want to make a duplicate tape. How can I do that ? (1 Reply)
Discussion started by: Anonno
1 Replies

6. Solaris

Copy Tape Drive DDS-01.

Hello, I am trying to copy a boot tape DDS-01 with miniroot, but i donīt get this copy. i have already used the command dd, but donīt work. There are other way to get it. (0 Replies)
Discussion started by: carelias
0 Replies

7. Solaris

Copy tape ?????????????

how i can copy entire content of a tape to HD ? the tape content a tar file i want to copy it onto hard disk and after do the untar ... The block size of the tar file is 1024 ..... wich command i must type ??? thank in advance ........ The operating system is sun .... (2 Replies)
Discussion started by: tt155
2 Replies

8. UNIX Desktop Questions & Answers

Copy a file from tape drive

Hi, How to copy a file (online.exp031204.tar.Z) from the tape drive /dev/rStp0 (2 Replies)
Discussion started by: rahmanm
2 Replies

9. Solaris

copy tape to tape using dd

I have two tape drives attached to my system , and i am trying to copy one tape to another using both tape drives and using the following command : dd if=/dev/rmt/1 of=/dev/rmt/2 but unfortunitly i am getting the following error : read: Not enough space 0+0 records in 0+0 records... (2 Replies)
Discussion started by: itsgeorge
2 Replies

10. Shell Programming and Scripting

another copy to tape question

I have a file called feed_file. Every week, I would like to copy this file to tape. I would not like the file on this tape to be over written with the previous weeks file. So what I would prefer to do is to add time stamp at the end of each weeks file on the tape in order for the files to look... (1 Reply)
Discussion started by: ted
1 Replies
Login or Register to Ask a Question