On Wed, 15 May 2019 20:48:46 -0400
Nathan Stratton Treadway <natha...@ontko.com> wrote:

> On Wed, May 15, 2019 at 17:02:57 -0600, Charles Curley wrote:
> > Using the official debian packages, I am accustomed to CDing to the
> > desired directory, and entering "amrecover DailySet1". I go through
> > the process with no issue as to which tape device to use and get a
> > good extraction.
> > 
> > Using the git package, I have to specify the tape device like so:
> > 
> > amrecover -d chg-disk:/var/amanda/vtapes -C DailySet1
> > 
> > If I don't specify the device, I get:
> > 
> > root@amanda:~/tmp/amanda/home# amrecover   
> [...] 
> > Extracting files using tape drive tape:/dev/YOUR-TAPE-DEVICE-HERE
> > on host localhost. The following tapes are needed: DailySet1-001  
> 
> 
> amrecover seems to pull the initial value of the -d setting from
> the "tapedev" setting in the amanda-client.conf file.
> 
> The official Debian Amanda packages do not install a "live"
> version of that file (rather, they install only some copies under
> /usr/share/doc/amanda-*/ )...

These go to /var/lib/amanda/example, but same idea.

> 
> ... but looking at the source repository it seems the Zmanda packages'
> postinst scripts copy the example file
> to /etc/amanda/amanda-client.conf

I didn't even look to see. I copy it in anyway; see below.

> 
> If that's true (and especially if that file contains the line 
>   tapedev "tape:/dev/YOUR-TAPE-DEVICE-HERE"
> ), then I'm guessing that commenting out that line -- or even just
> renaming the file to disable it completely [*] -- will allow amrecover
> to work as expected....

Here's what I do to customize:

cp -rp /var/lib/amanda/example/amanda.conf ${confDir}

# Now adjust the configuration to suit.
cd ${confDir}
sed -i -e "s/tape:\/dev\/YOUR-TAPE-DEVICE-HERE/chg-disk:\/var\/amanda\/vtapes/" 
amanda.conf
sed -i -e 's/tapetype HP-DAT/tapetype HARD-DISK/' amanda.conf

And that seems to works. It does produce one spurious commented out
change, on line 118.

--------------------------------------------------
root@amanda:/etc/amanda/DailySet1# diff amanda.conf 
/var/lib/amanda/example/amanda.conf 
107c107
< tapedev "chg-disk:/var/amanda/vtapes" # tape changer or device to use
---
> tapedev "tape:/dev/YOUR-TAPE-DEVICE-HERE"     # tape changer or device to use
118c118
< #   tapedev "tape:chg-disk:/var/amanda/vtapes"        # your tape drive 
device file
---
> #   tapedev "tape:tape:/dev/YOUR-TAPE-DEVICE-HERE"    # your tape drive 
> device file
130c130
< tapetype HARD-DISK            # what kind of tape it is (see tapetypes below)
---
> tapetype HP-DAT               # what kind of tape it is (see tapetypes below)
312c312
< define tapetype HARD-DISK {
---
> define tapetype HP-DAT {
root@amanda:/etc/amanda/DailySet1#
--------------------------------------------------



> 
> [*] though if you rename it, presumably it would be auto-recreated on
> package upgrade
> 
>                                                       Nathan
> 
> ----------------------------------------------------------------------------
> Nathan Stratton Treadway  -  natha...@ontko.com  -  Mid-Atlantic
> region Ray Ontko & Co.  -  Software consulting services  -
> http://www.ontko.com/ GPG Key:
> http://www.ontko.com/~nathanst/gpg_key.txt   ID: 1023D/ECFB6239 Key
> fingerprint = 6AD8 485E 20B9 5C71 231C  0C32 15F3 ADCD ECFB 6239



-- 
"When we talk of civilization, we are too apt to limit the meaning of
the word to its mere embellishments, such as arts and sciences; but
the true distinction between it and barbarism is, that the one
presents a state of society under the protection of just and
well-administered law, and the other is left to the chance government
of brute force."
- The Rev. James White, Eighteen Christian Centuries, 1889
Key fingerprint = CE5C 6645 A45A 64E4 94C0  809C FFF6 4C48 4ECD DFDB
https://charlescurley.com

Reply via email to