another copy to tape question


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting another copy to tape question
# 1  
Old 12-05-2002
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 unique

so, on the tape, I would have files looking like something like this:

feed_file021101
feed_file021108
feed_file021115
feed_file021122


Is this possible? If so can any one give me the suntax to do this?

I am running IBM AIX RS6000 4.3.3
The tape device is /dev/rmt1

BELOW IS THE CURRENT SCRIPT THAT I WROTE BUT IT'S NOT WORKING
=============================================================


#!/bin/ksh
#
#
#

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


tar -cvf - /u07/work/ted_test.log | dd of=/dev/rmt1/exp_dump.${dat}.$$

if (( ${?} != 0 ))
then
echo "move to tape for oracle exp_dump.${dat}.$$ failed" > /u07/work/temp.$$
mailx -s "MOVE OUTPUT FOR ORACLE failed" ted@abc.com < /u07/work/temp.$$

return 1
fi

return 0
| xargs -t rm
# 2  
Old 12-06-2002
Use the "-r" option to tar to append files to an existing archive. Something like:

tar -rvf /dev/rmt1 yourfile.datestamp
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

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 #!/bin/ksh # # Return Codes # 0 - success # 1 - failure # # # dat=`date +%y%m%d` cp /u07/work/theo_test.log /dev/rmt0/exp_dump.${dat}.$$ if (( ${?}... (1 Reply)
Discussion started by: ted
1 Replies
Login or Register to Ask a Question