Tape Labeling and Management
Hi Folks: I'm very new to using amanda, but I'm anxious to get a large numbers of servers backed up a bit more reliably with a good number of tape drives that I've dug up.I'm in the process of getting that set up, but I wanted to ask if some of the people who have been using amanda have found any really good tape labeling processes, utilities out there. Right now I have a large collection of tapes that have been labeled at one time or another for some purpose that they are no longer used for. I want to come up with some way of labeling these tapes, quickly and efficiently. Are there any database integration tools out there, that might assist in tape management that plays well with amanda? Is there anything that would allow me to do amlabel tapename, and throw that into a mysql database, that I could then run a query against to print out some labels? Thanks for the time. -- Brian E. Seppanen <[EMAIL PROTECTED]>
Re: Tape labeling question
On Sun, Jul 21, 2002 at 07:47:37PM +0100, Mark Cooke wrote: > On Sun, 2002-07-21 at 19:22, Gene Heskett wrote: > > In our experience, when the tape is recognized by the drive after > > being inserted, the drives compression setting is restored to > > whatever was in effect when the tape was last labeled. > So as long as as hardware compression is turned off (with the commanded > I used) *before* I run amlabel, then everytime I insert that tape it > will not use hardware compression, as it was labeled up with hardware > compression turned off? > > Just to make sure that hardware compression is turned off I've created a > small script that disables it and inserted that using cron to run, just > after amcheck, but before amdump. At least on the Linux box here you can put post-install st mt datcomp off to /etc/modules.conf and it will always set datcomp off immediately after loading the scsi tape "driver". I vaguely remember some mt's not supporting the datcomp keyword but that's just a command and you can replace it.
Re: Tape labeling question
On Sunday 21 July 2002 14:47, Mark Cooke wrote: >On Sun, 2002-07-21 at 19:22, Gene Heskett wrote: > >[..] > >> In our experience, when the tape is recognized by the drive >> after being inserted, the drives compression setting is restored >> to whatever was in effect when the tape was last labeled. > >So as long as as hardware compression is turned off (with the > commanded I used) *before* I run amlabel, then everytime I insert > that tape it will not use hardware compression, as it was labeled > up with hardware compression turned off? Thats correct AFAIK. >Just to make sure that hardware compression is turned off I've > created a small script that disables it and inserted that using > cron to run, just after amcheck, but before amdump. That won't do much good because amdump will re-read the label, which will reset it to whatever it was when the NEW tape was labeled the first time. Thats why I had to do the huge writes with dd to make the drive flush the buffers and actually update the tape itself. Am I making sense? Like this, assuming nst0 is the non-rewinding device and st0 is the rewinding one. dd if=/dev/st0 of=/tmp/header # this will leave it rewound mt -f /dev/nst0 compression off mt -f /dev/nst0 datcompression off mt -f /dev/nst0 defcompression off dd if=/tmp/header of=/dev/nst0 # too small a write, no data # actually moves to the tape but a tell will say block 1 dd if=/dev/zero of=/dev/nst0 count=131072 # which should force the buffer to be flushed to tape mt -f /dev/nst0 tell #verify position mt -f /dev/nst0 rewind mt -f /dev/nst0 tell # should be at block 0 and compression led is # off after amcheck has looked at it. diddle to suit, particularly the count variable above, some drives may have an even bigger buffer. -- Cheers, Gene AMD K6-III@500mhz 320M Athlon1600XP@1400mhz 512M 99.07% setiathome rank, not too shabby for a WV hillbilly
Re: Tape labeling question
On Sun, 2002-07-21 at 19:22, Gene Heskett wrote: [..] > In our experience, when the tape is recognized by the drive after > being inserted, the drives compression setting is restored to > whatever was in effect when the tape was last labeled. So as long as as hardware compression is turned off (with the commanded I used) *before* I run amlabel, then everytime I insert that tape it will not use hardware compression, as it was labeled up with hardware compression turned off? Just to make sure that hardware compression is turned off I've created a small script that disables it and inserted that using cron to run, just after amcheck, but before amdump. Mark -- --- To steal ideas from one person is plagiarism; to steal from many is research.
Re: Tape labeling...
>From: Alexandre Oliva <[EMAIL PROTECTED]> >Date: 20 Dec 2000 10:50:07 -0200 >>> amlabel won't let me do that. >> Use the -f option of amlabel. From the amlabel man page... >But note that this will erase the contents of the tape. In fairness, (just about?) any other time the tape is open()ed for write, then close()d, that will also make the rest of the tape unreadable, effectively removing the (former) contents form accessibility. Cheers, david -- David Wolfskill [EMAIL PROTECTED] UNIX System Administrator Desk: 650/577-7158 TIE: 8/499-7158 Cell: 650/759-0823
Re: Tape labeling...
On Dec 20, 2000, Peter Murphy <[EMAIL PROTECTED]> wrote: > Hello David, > At 2000-12-20 10:12:47 +0100 (Wednesday), David Klasinc wrote: >> >> If I have a tape with some label, how can I rename it? >> >> amlabel won't let me do that. > Use the -f option of amlabel. From the amlabel man page... But note that this will erase the contents of the tape. -- Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/ Red Hat GCC Developer aoliva@{cygnus.com, redhat.com} CS PhD student at IC-Unicampoliva@{lsd.ic.unicamp.br, gnu.org} Free Software Evangelist*Please* write to mailing lists, not to me
Re: Tape labeling...
Hello David, At 2000-12-20 10:12:47 +0100 (Wednesday), David Klasinc wrote: > > If I have a tape with some label, how can I rename it? > > amlabel won't let me do that. Use the -f option of amlabel. From the amlabel man page... NAME amlabel - label an Amanda tape SYNOPSIS amlabel [-f] config label [ slot slot ] DESCRIPTION .. Amlabel will not write the label if the tape contains an active amanda tape or if the label specified is on an active tape. The -f (force) flag bypass these verification. Regards, -- __ )/ / / __ ) ___/ __ ) ___/ / ___/ / ___/ / __/(/(/(/__/
Tape labeling...
Banzai! If I have a tape with some label, how can I rename it? amlabel won't let me do that. (Don't tell me that mt -f /dev/nst0 erase is the only option, plz :)) -- David Klasinc TurboLinux Inc. - Received SIGTERM. Shutting down.
re: sugestion for tape labeling Yea or Nea?
On Tue, 14 Nov 2000, David Wolfskill wrote: >>There is an admin here who suggested I >>modify the labelstr. Will this work? > >>- you should modify >>labelstr to "$[0-9][0-9][0-9]" > >Changing the labelstr may be useful. > >But since it's a (Perl) regex, I'd be rather surprised if a string with >non-terminating "$" characters would be useful for anything: that >character is used to provide an "anchor" for the right-hand side of the >string. It looks to me like the admin who suggested that is an SQL guru. $ is a wildcard character for Oracle, I think. Replace that chain of pattern with the simpler perl pattern: ".\d\d\d" "." means any one character, "\d" means any digit. A safer pattern, the one I use, is "DailySet1\d\d". -- Joi Ellis [EMAIL PROTECTED], http://www.visi.com/~gyles19/
re: sugestion for tape labeling Yea or Nea?
>Date: Tue, 14 Nov 2000 21:56:18 + (GMT) >From: Denise Ives <[EMAIL PROTECTED]> >There is an admin here who suggested I >modify the labelstr. Will this work? >- you should modify >labelstr to "$[0-9][0-9][0-9]" Changing the labelstr may be useful. But since it's a (Perl) regex, I'd be rather surprised if a string with non-terminating "$" characters would be useful for anything: that character is used to provide an "anchor" for the right-hand side of the string. Cheers, david -- David Wolfskill [EMAIL PROTECTED] UNIX System Administrator Desk: 650/577-7158 TIE: 8/499-7158 Cell: 650/759-0823
Re: tape labeling scheme
>How can I identify amanda tapes by level of dump? ... Jonathan and David are correct that normally you would not do this as Amanda may scatter dump levels all over the place w.r.t. the tapes. But they have clearly not been following the "Saga of Denise" in the list :-). In summary, Denise is being forced to run Amanda into just the holding disk for every run in the week except one. Just before that one day, she will do an amflush to dump the holding disk, then an "amadmin XX force" to request all full dumps, then a normal amdump to tape. She also has a very limited number of tapes, four, which implies using two for the amflush (incremental) and two for the amdump (full). In this limited environment, she could reasonably expect to know what goes on what tapes w.r.t. levels, at least full vs. incremental. >I can label a tape >that had a full dump on Nov1 as daily111 but I can't label a tape >that had a full dump on Nov 24th as daily1124. I don't think most people relabel tapes every time, and certainly not with meaningful encoding of such things as the date they were used. The typical method is to just create a set of tapes and let Amanda cycle around through them, i.e. daily00, daily01, daily02, daily03. Why do you want to relabel them each time? Amanda will tell you (via amadmin or amrecover) which tape has which dump image on it. >NO - amanda@sundev1 [amanda] % amlabel daily daily11N >amlabel: label daily11N doesn't match labelstr "^daily[0-9][0-9]*$" This just says you need to "enhance" your labelstr. Maybe something like: "^daily[0-9A-Z][0-9A-Z]*$" >There is an admin here who suggested I modify the labelstr. Will this work? Yes, however ... >- you should modify labelstr to "$[0-9][0-9][0-9]" ... that is not a valid regular expression, or at least not the one you want. Image all your tape labels in a file and what grep pattern you would use to match them. >Denise E. Ives John R. Jackson, Technical Software Specialist, [EMAIL PROTECTED]
re: sugestion for tape labeling Yea or Nea?
There is an admin here who suggested I modify the labelstr. Will this work? - you should modify labelstr to "$[0-9][0-9][0-9]" -- Denise E. Ives [EMAIL PROTECTED] Systems Engineer734.822.2037 Multilingual Internet Domain Name Registrations - http://www.walid.com
Re: tape labeling scheme
>Date: Tue, 14 Nov 2000 18:03:01 + (GMT) >From: Denise Ives <[EMAIL PROTECTED]> >How can I identify amanda tapes by level of dump? I can label a tape >that had a full dump on Nov1 as daily111 but I can't label a tape >that had a full dump on Nov 24th as daily1124. I'm sorry, but I think the question indicates a misunderstanding. You may well have things set up so that the idea of a (single) "level of dump" on the tape corresponds to something that an observer could reference... but I submit that such a configuration would be rather anomalous for amanda. (Granted, I set things up so that there are respects in which my amanda configuration is rather anomalous, too) But usually, amanda will use a mixture of levels during a given dump run, and the resulting backup images will get written to some set of tapes. As a result, each tape is likely to have a mixture of full and incremental (often, of differing levels) backup images on it. That's (generally) OK; amanda keeps track of what is where, so you can restore any object that is backed up to its state as of any date it was backed up. Where things get potentailly messy with this scheme is with "disaster recovery preparedness" -- you would need to keep an entire dumpcycle's worth of media in the "safe location" of your choice. (And if that is off-site, you no longer have access to these media while you are on-site.) Other folks have written about what they do, in ways that are likely better than I could, so I'll stop here. Cheers, david -- David Wolfskill [EMAIL PROTECTED] UNIX System Administrator Desk: 650/577-7158 TIE: 8/499-7158 Cell: 650/759-0823
Re: tape labeling scheme
Hello Denise, Denise Ives wrote: > How can I identify amanda tapes by level of dump? I can label a tape > that had a full dump on Nov1 as daily111 but I can't label a tape > that had a full dump on Nov 24th as daily1124. The short answer is: You can't, because amanda doesn't work that way. I just label my tapes sequentially eg. DailySet1.000 DailySet1.001 DailySet1.002. I like to have the name of the dump configuration in the label to avoid confusion because I have more than one dump config. Restoring files is not a problem because "amrecover" or "amadmin config find" will tell you which tapes you need to load to restore files. Once you have all of the tapes that you want in your cycle labeled, "amcheck" will tell you which tape you need to load next, or you can use "amadmin config tape" to find out which tape to use. There will be a mix of full and incremental dumps on each tape because the goal of amanda is to balance the load on the network so that it is about the same for every run. Eventually, you will be recycling tapes, in which case the date will no longer be valid, or you would have to "remove" the tape and label it again which is an unnecessary pain. That is unless this is a special dump cycle with tapes that you will never overwrite. You could hypothetically set up a separate dump config just for full dumps but I don't think it's worth it--I tried to do it once and found that it was far more of a pain than it was worth. I've found that it's much easier and better to just let amanda do its thing instead of trying to second guess it. -- "Jonathan F. Dill" ([EMAIL PROTECTED]) CARB Systems and Network Administrator Home Page: http://www.umbi.umd.edu/~dill
tape labeling scheme
How can I identify amanda tapes by level of dump? I can label a tape that had a full dump on Nov1 as daily111 but I can't label a tape that had a full dump on Nov 24th as daily1124. Yes - amlabel -f daily 111 or use a letter to represent the month - NO - amanda@sundev1 [amanda] % amlabel daily daily11N amlabel: label daily11N doesn't match labelstr "^daily[0-9][0-9]*$" NO - amanda@sundev1 [amanda] % amlabel daily daily1102 tape has not been labeled. any ideas how to track this? #tapetype DAT # what kind of tape it is (see tapetypes below) tapetype SEAGATE-SCORPION-40 labelstr "^daily[0-9][0-9]*$" # label constraint regex: all tapes must match -- Denise E. Ives [EMAIL PROTECTED] Systems Engineer734.822.2037 Multilingual Internet Domain Name Registrations - http://www.walid.com