APLawrence - Information and Resources for Unix and Linux Systems, Bloggers and the self-employed
RSS Feeds Get APLawrence.com by RSS











(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Home > News Posts > backup scripts ––>Re: How can i see whats on a backuptape?
Printer Friendly Version




News Group Posts

backup scripts




From: Tony Lawrence <tony@pcunix.com>
Subject: Re: How can i see whats on a backup tape?
Date: Fri, 15 Nov 2002 08:00:55 -0500

ulUlven wrote:
> On our SCO server, the way i'm taking backup of the server works with this
> script.
> 
> ------ script start --------
> #/bin/bash
> # Backup script.
>    echo "" > /var/log/backup.txt
>    echo "Backup logg for `date` on ITGOSLO Tourplan server" >>
> /var/log/backup.txt
>    echo " " >> /var/log/backup.txt
>    echo "Enabling Compression on tape drive" >> /var/log/backup.txt
>    echo " " >> /var/log/backup.txt
>  tape -a 3 setcomp /dev/rct0 >> /var/log/backup.txt
>  tape getcomp /dev/rct0 >> /var/log/backup.txt
>   sleep 3
>  tape erase >> /var/log/backup.txt
>    echo "Getting status of backup, if this does not exists, backup has not
> run!" >> /var/log/backup.txt
>    echo " " >> /var/log/backup.txt
>  tape status >> /var/log/backup.txt
>    echo " " >> /var/log/backup.txt
>    echo "Starting backup of server (Complete)..."
>   sleep 3
>  find /app -depth -print | cpio -ovcuB -O /dev/rct0
>   sleep 3
>    echo "Backup Complete if Tape Status exists, else failed" >>
> /var/log/backup.txt
>  mailx -s "Backuplog from ITG" freddy@mymaildomain.no < /var/log/backup.txt
> 
> -------------- end of script -------------
> 
> This script tells me nothing of the backup has run as it should, therefore i
> would like to do like a "ls" ore something on the tape, read whats on the
> tape and add it to my backup logg.
> Anyone have some tips for me, changes i should do, better sollutions etc..
> please come with it :-)

FAR better solution: http://aplawrence.com/Reviews/supertars.html














My suspicion is that you got that script from someone else.  I say that 
because if you knew enough to write that, you would know how to list the 
tape at least, but you don't.

So you are using a script you really don't understand. Frankly, it's a 
crappy script.

Do you understand that it is NOT backing up your server but only one 
directory?

Do you understand that the "tape erase" is probably unnecessary and a 
waste of time?

How about that the "setcomp" is done on the wrong device?

Do you understand that the "Backup Complete if Tape Status exists, else 
failed" message is absolutely untrue?  You backup could fail in all 
sorts of ways that this script would never catch.



Do you understand that even the listing you requested WOULD NOT 
guarantee the integrity of the backup at all?

So.. do you REALLY want to trust backup to this sort of scripting?

BTW, I'm not trying to beat up on you for not knowing this stuff. 
That's OK- every one of us started out not knowing anything, and most of 
us still have tremendous gaps in our knowledge.  My purpose in asking 
these questions is not to embarass you, but to show you the defects of 
the script.

Most of us here are capable of writing scripts that would work far 
better than that rather pathetic thing.  Yet, we don't.  Just about 
every qualified person here uses one of the supertar products for their 
important servers.  Why?  Because we ARE NOT capable of doing anything 
half as good as what the professionals do.

Let me tell you how important it is.  Because I'm rather well known and 
publish reviews of this stuff, and resell the products, I can (and do) 
get free copies of these things for my internal use. IN SPITE OF THAT I 
PURCHASE MY OWN.  I use the review copies for reviews and test boxes, 
but having good backup is so important to me that I pay for what I also 
  get free.  My wife thinks I am nuts, and probably the Supertar folks 
do too, but it does tell you something, doesn't it?

IF YOUR DATA HAS VALUE IT IS WORTH SPENDING MONEY TO PROTECT IT.

There are many thousands of engineering man hours put in by the various 
supertar vendors to test and perfect their products  They think about 
problems that you and I have never seen.  The products have been refined 
for years and years now, getting better with each iteration.  These 
things have as much relationship to that script as a Model T Ford has to 
a modern Ferrari.  There's no exaggeration there either.

Yep, this is turning into a rant :-)

Not picking on you now, but I am SO tired of people coming here looking 
for backup scripts.  THERE'S NO SUCH THING AS A REALLY GOOD BACKUP 
SCRIPT!  You really CANNOT do it with shell scripting, tar and cpio. 
You MIGHT be able to come close to what the supertars do by clobbering 
together some other open source stuff, but if you had the necessary 
expertise to do that well, you wouldn't need to come here and ask 
questions about it.

I trust my backups to professionals. Most and maybe all of the 
knowledgeable folk here on the ng do the same.  Again, you come here 
looking for advice from knowledgeable people, but we DON'T use that kind 
of scripting for important backups, we use the supertars.  If you are 
not as knowledgeable as the regular posters here, shouldn't you do the 
same?  Yes, you should.

Oh, one more thing  Do you really think that mail harvesting bots are 
too stupid to automatically remove "REMOVESPAM" from 
freddy@REMOVESPAMulven.com ?  Such techniques are completely useless and 
serve no purpose other than to annoy humans who want to reply to you.  I 
can absolutely guarantee that every harvesting bot out there does the 
equivalent of Perl s/REMOVESPAN//i and other obvious cleanups.  I 
personally see no value to such obfuscation at all, but if you think you 
have to doit, more cleverness (and thus more annoyance for humans) is
needed.  How about "notfredbutusefreddy@ulven.com". or 
"bettertotryfreddy@ulven.com". Those might work for a while. You also 
really shouldn't mess with the domain because it causes wasted dns 
lookups.




-- 


Tony Lawrence
Unix/Linux Support Tips, How-To's, Tests and more: http://aplawrence.com
Free Unix/Linux Consultants list: http://aplawrence.com/consultants.html


If this page was useful to you, please click to help others find it:  

Your +1's can help friends, contacts, and others on the web find the best stuff when they search.

Comments?



Click here to add your comments



Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments


If you want a picture to show with your comment, go get a Gravatar



Auto FTP Manager

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

Jump to Comments



Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.

Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.

We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.

g_face.jpg

This post tagged:

       - SCO_OSR5




Unix/Linux Consultants

Skills Tests

Guest Post Here