On Friday 16 August 2019 13:38:45 ghe wrote:

> I have reason to believe that one of my tapes isn't working properly
> (last night's backup died without finishing because of a tape error --
> the retry running right now successfully flushed last night's and
> wrote a new one).
>
> Is there an Amanda utility that will validate a tape without
> destroying the Amanda header at the front of the tape? And maybe build
> a 'bad sector table' on the tape?

I did that once for a very old hard drive, permanently allocating about 
30 sectors to a file named badsectors.fd.  Worked great.

But AFAIK, tapes don't maintain an allocation map, and we have no tape 
writing tools so organized as to be able to implement such a scheme.

Because tape is sequential, any such attempt would have to maintain such 
a mapping on separate random access media.

The drive would have to be able to seek past the damaged tape to the next 
block with a good checksum, something I've not found a drive capable of 
doing in around a decade of trying, they all stop and error on the bad 
spot.

The error correction in the average terabyte class spinning rust drive 
has far exceeded that of tape, yes I'm talking about the sub $100 drive 
here, and I haven't lost a single bit of data in the 15+ years since I 
converted to vtape. by having amanda write to virtual tapes which are 
nothing but directories you can read without using anything in the 
amanda ammo box at all if push comes to shove while doing a bare metal 
recovery. In fact, because the amanda index's are only valid after the 
run has been completed, I have written a wrapper script that collects 
that, and the configuration files, and writes then all into the 
directory on the hd that it just used as a virtual tape. That has the 
effect of, in case of bare metal on a clean drive, bringing the recovery 
to a day fresher status.

I have a machine that normally is part of the backup, with a lightning  
damaged psu, so that machine is missing from last nights backup. "data" 
is a softlink to the last runs vtape:
gene@coyote:~$ sudo ls -l /amandatapes/Dailys/data/
total 26361140
-rw------- 1 amanda amanda       32768 Aug 26 02:03 00000.Dailys-35
-rw------- 1 amanda amanda      133105 Aug 26 02:03 
00001.lathe._var_lib_amanda.1
-rw------- 1 amanda amanda      120881 Aug 26 02:03 
00002.shop._var_lib_amanda.1
-rw------- 1 amanda amanda      103947 Aug 26 02:04 
00003.lathe._usr_src.1
-rw------- 1 amanda amanda       99164 Aug 26 02:04 00004.shop._home.1
-rw------- 1 amanda amanda       53242 Aug 26 02:04 00005.lathe._etc.1
-rw------- 1 amanda amanda       53365 Aug 26 02:04 00006.shop._etc.1
-rw------- 1 amanda amanda    13327331 Aug 26 02:04 00007.picnc._.1
-rw------- 1 amanda amanda       49184 Aug 26 02:04 00008.lathe._home.1
-rw------- 1 amanda amanda       36715 Aug 26 02:04 
00009.shop._lib_firmware.1
-rw------- 1 amanda amanda       34105 Aug 26 02:04 00010.picnc._boot.1
-rw------- 1 amanda amanda       36713 Aug 26 02:05 
00011.lathe._lib_firmware.1
-rw------- 1 amanda amanda       35314 Aug 26 02:05 00012.shop._root.1
-rw------- 1 amanda amanda       35244 Aug 26 02:05 00013.lathe._root.1
-rw------- 1 amanda amanda       33712 Aug 26 02:05 
00014.shop._usr_local.0
-rw------- 1 amanda amanda       33713 Aug 26 02:05 
00015.lathe._usr_local.0
-rw------- 1 amanda amanda       32938 Aug 26 02:05 
00016.shop._var_amanda.0
-rw------- 1 amanda amanda       32939 Aug 26 02:05 
00017.lathe._var_amanda.0
-rw------- 1 amanda amanda       33043 Aug 26 02:05 
00018.shop._usr_lib_amanda.1
-rw------- 1 amanda amanda       33044 Aug 26 02:06 
00019.lathe._usr_lib_amanda.1
-rw------- 1 amanda amanda 12046283958 Aug 26 02:17 
00020.coyote._home_gene_Download.0
-rw------- 1 amanda amanda   187740857 Aug 26 02:18 
00021.coyote._home_gene.3
-rw------- 1 amanda amanda    10867557 Aug 26 02:18 
00022.coyote._home_gene_Mail.3
-rw------- 1 amanda amanda       33569 Aug 26 02:18 
00023.coyote.Downloadsnz.1
-rw------- 1 amanda amanda      840726 Aug 26 02:18 
00024.coyote._home_amanda.1
-rw------- 1 amanda amanda      252550 Aug 26 02:18 
00025.coyote._home_gene_src.1
-rw------- 1 amanda amanda      159619 Aug 26 02:18 
00026.coyote.Downloadsam.1
-rw------- 1 amanda amanda       37341 Aug 26 02:18 
00027.coyote._home_ups.1
-rw------- 1 amanda amanda       35159 Aug 26 02:18 
00028.coyote._home_nut.1
-rw------- 1 amanda amanda   638043961 Aug 26 02:20 
00029.coyote._GenesAmandaHelper-0.61_config-bak.3
-rw------- 1 amanda amanda       33308 Aug 26 02:20 
00030.coyote._GenesAmandaHelper-0.61.1
-rw------- 1 amanda amanda   348438528 Aug 26 02:20 00031.coyote._var.4
-rw------- 1 amanda amanda 13234614709 Aug 26 02:48 
00032.coyote.PublicAap.0
-rw------- 1 amanda amanda    16479741 Aug 26 02:48 
00033.coyote._usr_local.1
-rw------- 1 amanda amanda    11653827 Aug 26 02:48 00034.coyote._opt.1
-rw------- 1 amanda amanda      841528 Aug 26 02:48 
00035.coyote._usr_share.1
-rw------- 1 amanda amanda      811008 Aug 26 02:48 00036.coyote._root.1
-rw------- 1 amanda amanda      319176 Aug 26 02:48 
00037.coyote._usr_src.2
-rw------- 1 amanda amanda      278528 Aug 26 02:48 
00038.coyote._home_gene_Pictures.1
-rw------- 1 amanda amanda      256256 Aug 26 02:48 
00039.coyote._usr_lib.1
-rw------- 1 amanda amanda      196608 Aug 26 02:48 
00040.coyote._usr_pix.1
-rw------- 1 amanda amanda      163939 Aug 26 02:48 
00041.coyote.PublicAqz.1
-rw------- 1 amanda amanda       32902 Aug 26 02:48 
00042.coyote._usr_games.1
-rw------- 1 amanda amanda       32987 Aug 26 02:48 
00043.coyote.PublicAAZ.1
-rw------- 1 amanda amanda      122069 Aug 26 02:48 00044.coyote._lib.1
-rw------- 1 amanda amanda       94208 Aug 26 02:48 00045.coyote._CoCo.1
-rw------- 1 amanda amanda       73728 Aug 26 02:48 
00046.coyote._usr_movies.1
-rw------- 1 amanda amanda       73728 Aug 26 02:48 
00047.coyote._usr_bin.1
-rw------- 1 amanda amanda       73728 Aug 26 02:48 
00048.coyote._home_gene_Documents.1
-rw------- 1 amanda amanda       62029 Aug 26 02:48 00049.coyote._etc.1
-rw------- 1 amanda amanda       53248 Aug 26 02:48 00050.coyote._boot.1
-rw------- 1 amanda amanda       51004 Aug 26 02:48 
00051.coyote._usr_include.1
-rw------- 1 amanda amanda       43008 Aug 26 02:48 
00052.coyote._usr_music.1
-rw------- 1 amanda amanda       43008 Aug 26 02:48 
00053.coyote._usr_dlds_books.1
-rw------- 1 amanda amanda       43008 Aug 26 02:48 
00054.coyote._usr_dlds_tgzs.1
-rw------- 1 amanda amanda       43008 Aug 26 02:48 
00055.coyote._usr_dlds_misc.1
-rw------- 1 amanda amanda       43008 Aug 26 02:48 00056.coyote._sbin.1
-rw------- 1 amanda amanda       43015 Aug 26 02:48 
00057.coyote._home_gene_PublicB.1
-rw------- 1 amanda amanda       43008 Aug 26 02:48 
00058.coyote._home_gene_Music.1
-rw------- 1 amanda amanda       43008 Aug 26 02:48 
00059.coyote._home_gene_Videos.1
-rw------- 1 amanda amanda       43008 Aug 26 02:48 
00060.coyote._home_gene_LCNC-isos.1
-rw------- 1 amanda amanda       43008 Aug 26 02:49 00061.coyote._bin.1
-rw------- 1 amanda amanda       34660 Aug 26 02:49 
00062.coyote._usr_sbin.1
-rw-r--r-- 1 amanda amanda      112640 Aug 26 02:51 configuration.tar
-rw-r--r-- 1 amanda amanda   479682560 Aug 26 02:51 indices.tar

Simple, and effective.  That 2T drive has 60 such "vtapes" on it, so I've 
60 days of backups. If for business purposes, you need more history, 
the "slot-nnn" of the tapes label could be extended, made sequential to 
the next drive, and this one taken off site for extended storage.  There 
are script snippets to facilitate the setup of such long term usages in 
the tarball GenesAmandaHelper-0.61.tar.gz on my web site in the sig.  
All of then should be considered as examples, freely editable to suit 
your circumstance.

Copyright 2019 by Maurice E. Heskett
Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/gene>

Reply via email to