The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
[help] how to get serial number of cpu or other hardware bucci SUN Solaris 8 05-25-2008 09:03 PM
Serial number tpx99 SUN Solaris 4 05-24-2008 08:25 PM
Sun 280r serial number BG_JrAdmin SUN Solaris 16 05-24-2008 07:28 PM
Display Serial Number dkranes SUN Solaris 5 05-16-2008 06:38 AM
serial number for E3500 i2admin UNIX for Advanced & Expert Users 3 04-10-2003 12:18 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 07-20-2004
Registered User
 

Join Date: Oct 2003
Location: Torres Novas, Portugal
Posts: 18
Unhappy Tape Serial Number

Hello Experts,

I've got a shell script that makes the backup of the files that i want. I also have this script showing the amount of files backed up and in witch folders they are.
It's only missing one thing.

I got all the information beeing stored in a text file and all i've got to do is to see that file in the morning to see if all went well. The problem is that i may not know if the tapes are beeing changed daily as it is supposed to. So the trick is to know the tape serial number, because i use one tape for each day of the week.

How can i accomplish this?
Witch script can return me the serial number of the tape?

Thank you so much,

Jorge Ferreira
__________________
Regards,

Jorge Ferreira
Reply With Quote
Forum Sponsor
  #2  
Old 07-20-2004
Registered User
 

Join Date: Sep 2002
Location: The Netherlands
Posts: 16
Hello Jorge

I think it would be better to label your tapes in order to be able to identify them.
The command to write a label to the tapes obviously depends on your O.S.
Reply With Quote
  #3  
Old 07-20-2004
Registered User
 

Join Date: Oct 2003
Location: Torres Novas, Portugal
Posts: 18
UnixWare SCO 7

Ok.
My OS is the UnixWare SCO 7.
How to label the tapes then?


Thank you for your reply.

Jorge
__________________
Regards,

Jorge Ferreira
Reply With Quote
  #4  
Old 07-20-2004
Registered User
 

Join Date: Jul 2004
Location: New York State
Posts: 65
How are you doing the backup. What software are you using. When the previous person talked about labeling the tape, he meant to write a logical label to the tape. This will not work (for example) if you are writing to the tape as a raw device using something like tar. If it isn't too big. put the backup script into a note.
Reply With Quote
  #5  
Old 07-21-2004
Registered User
 

Join Date: Oct 2003
Location: Torres Novas, Portugal
Posts: 18
Wink How do I label my tapes?

Ok, this is the deal.

The backup is being made by a tar command, directly to the tape. Something like: tar cvf ./xpto /dev/tape

In this script i check the time of start and end of the script and the amount of files in each directory copied. Each of these informations are being sent to a text file wich is created with the "DayMonthYear.txt" format. Something like 01122004.txt.

Another information i would like to put in these text files is if the backup is being made to the right tape. Because the backup of Friday wouldn't be made to the Wednesday tape. Tapes' got to be chaged daily.

So aparently the trick is to know witch tape is in the drive. If i can label my tapes and then check the label in the script, I would have the problem solved.

That's it,

Thak you for all your replies,


Jorge Ferreira
__________________
Regards,

Jorge Ferreira
Reply With Quote
  #6  
Old 07-21-2004
Registered User
 

Join Date: Jul 2004
Location: New York State
Posts: 65
Sorry, your out of luck. Tar writes to the tape as a raw device. While you can have multiple tars on a tape (seperated by EOF marks), you can't logically label the tape.
Reply With Quote
  #7  
Old 07-23-2004
Registered User
 

Join Date: Oct 2003
Location: Torres Novas, Portugal
Posts: 18
The script

Maybe it's better to post the script to see if there's anything that can be done.
Attached Files
File Type: txt bck_medidata.txt (3.7 KB, 7 views)
__________________
Regards,

Jorge Ferreira
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 12:31 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0