I'm running into some confusion running amrecover with Amanda version 3.5.1.
I have a slightly complex amanda.conf with storage definitions that I originally set up when I was
running two tape libraries, one with an LTO6 drive and one with two LTO7 drives. I've decommissioned
the LTO6 now, but I still have the storage definition that is used for the LTO7. The backups seem to
be running just fine and sometimes will overlap with parallel instances. I don't quite understand
how Amanda keeps its brain straight when this is happening, and maybe it doesn't entirely.
When I use the amtape command, I will typically do something like "amtape -o storage=research daily
slot 24". The two drives show up as /dev/nst0 and /dev/nst1. I have amanda-client.conf set to
/dev/nst0, knowing that I can change that on the fly to /dev/nst1.
With amrecover, apparently there is no facility to indicate the storage. I've tried and I've looked
at the man page. When I simply do the amrecover without that specified, I keep getting
amrecover> extract
Extracting files using tape drive tape:/dev/nst0 on host marlin.
The following tapes are needed: Bio-Research-027
Extracting files using tape drive tape:/dev/nst0 on host marlin.
Load tape Bio-Research-027 now
Continue [?/Y/n/s/d]? y
Error reading Amanda header: block size too small
Load tape Bio-Research-027 now
Continue [?/Y/n/d]?
I'm not sure where to go with this. Unfortunately, I have to get it ironed out pretty quickly. I'm
retiring at the end of this week, and I need to provide documentation on how to do everything. This
works on my other Amanda servers, but this server is more complicated.
I am copying the amanda.conf below. The tail of the amrecover log is at the
very end.
--
---------------
Chris Hoogendyk
-
O__ ---- Systems Administrator
c/ /'_ --- Biology & Geosciences Departments
(*) \(*) -- 315 Morrill Science Center
~~~~~~~~~~ - University of Massachusetts, Amherst
<[email protected]>
---------------
Erdös 4
# amanda.conf - sample Amanda configuration file. See amanda.conf(5) for
# details
org "Biology (Marlin)" # your organization name for reports
#mailto "amanda" # space separated list of operators at your site
mailto "amanda"
mailer "/usr/bin/mailx"
dumpuser "amanda" # the user to run dumps under
inparallel 10 # maximum dumpers that will run in parallel (max 63)
maxdumps 4
dumporder "tttTTTTTTT" # specify the priority order of each dumper
taperalgo first # The algorithm used to choose which dump image to send
displayunit "k" # Possible values: "k|m|g|t"
netusage 250000 Kbps # maximum net bandwidth for Amanda, in KB per sec
dumpcycle 1 weeks # the number of days in the normal dump cycle
runspercycle 7 # the number of amdump runs in dumpcycle days
bumpsize 200 Mb # minimum savings (threshold) to bump level 1 -> 2
bumppercent 20 # minimum savings (threshold) to bump level 1 -> 2
bumpdays 1 # minimum days at each level
bumpmult 4 # threshold = bumpsize * bumpmult^(level-1)
etimeout 2000 # number of seconds per filesystem for estimates.
dtimeout 3600 # number of idle seconds before a dump is aborted.
ctimeout 60 # maximum number of seconds that amcheck waits
# for each client host
device_output_buffer_size 10240k
# amount of buffer space to use when writing to devices
storage "research"
#storage "research" "daily"
flush-threshold-dumped 0
flush-threshold-scheduled 0
taperflush 0
autoflush yes
tapetype "PSEUDO"
runtapes 1 # number of tapes to be used in a single run of
amdump
maxdumpsize 15336444416 kbytes # Maximum number of bytes the planner
will schedule
# To use a tape library, uncomment this definition. See amanda-changers(7)
# for more configuration options.
#
#<>define changer NEO200 {
#<> tpchanger "chg-robot:/dev/tape/by-id/scsi-1IBM_3573-TL_00L2U78AB542_LL0"
# your changer device file (T24)
#<> property "tape-device" "0=tape:/dev/nst0" # your tape drive device
file
#<> property "use-slots" "1-22" # UPDATE WHEN TAPES ADDED
<<<<<<<<<<<<<<<<<<<<<
#<> }
#define policy daily {
#
## initially (8/30/2017) set this up to mimic the old global tapecycle
## later can check out more refined options, such as retention-recover
# retention-tapes 15
#
#}
#define storage daily {
#
# tpchanger "NEO200"
#
# tapetype "LTO6" # what kind of tape it is (see tapetypes below)
#
# policy "daily"
#
# eject-volume yes
#
# labelstr "^Bio-Daily-[0-9][0-9][0-9]*$" # label constraint regex: all
tapes must match
#
# tapepool "daily"
#
# dump-selection "daily" ALL
#
#}
define changer NEO200x48 {
tpchanger "chg-robot:/dev/tape/by-id/scsi-1BDT_FlexStor_II_00MX64200626_LL0"
# your changer device file (T48)
property "tape-device" "0=tape:/dev/nst1" # your tape drive device file
property append "tape-device" "1=tape:/dev/nst2" # your tape drive
device file
property "use-slots" "1-40" # UPDATE WHEN TAPES ADDED
<<<<<<<<<<<<<<<<<<<<<
}
amrecover-changer "NEO200x48" # amrecover will use the changer if you restore
# from this device. It could be a string like 'changer' and amrecover will
use your
# changer if you set your tape to 'changer' with 'setdevice changer' or via
# 'tapedev "changer"' in amanda-client.conf
define policy research {
retention-tapes 24
}
define storage research {
tpchanger "NEO200x48"
tapetype "LTO7"
policy "research"
eject-volume yes
labelstr "^Bio-Research-[0-9][0-9][0-9]*$"
tapepool "research"
dump-selection "research" ALL
}
holdingdisk hd1 {
comment "holding disk #1"
directory "/amanda3" # where the holding disk is
use -100 Gb # how much space can we use on it
chunksize 1Gb # size of chunk if you want big dump to be
}
holdingdisk hd2 {
comment "holding disk #2"
directory "/amanda4"
use -100 Gb
chunksize 1GB
}
reserve 10 # percent
infofile "/usr/local/etc/amanda/daily/curinfo" # database DIRECTORY
logdir "/usr/local/etc/amanda/daily/log" # log directory
indexdir "/usr/local/etc/amanda/daily/index" # index directory
#tapelist "/usr/local/etc/amanda/daily/tapelist" # list of used tapes
define tapetype global {
part_size 3G
part_cache_type none
}
define tapetype HP-DAT {
global
comment "DAT tape drives"
# data provided by Rob Browning <[email protected]>
length 1930 mbytes
filemark 111 kbytes
speed 468 kbytes
}
define tapetype DAT {
global
comment "DAT tape drives"
length 1000 mbytes # these numbers are not accurate
filemark 100 kbytes # but you get the idea
speed 100 kbytes
}
define tapetype SEAGATE-ULTRIUM-LTO {
global
comment "SEAGATE ULTRIUM 06242 LTO, compression off"
length 99584 mbytes
filemark 0 kbytes
speed 11288 kps
}
define tapetype LTO6 {
comment "IBM ULTRIUM HH6"
comment "Created by amtapetype; compression disabled"
length 2459953152 kbytes
filemark 3289 kbytes
speed 157014 kps
blocksize 2048 kbytes
}
define tapetype LTO7 {
comment "IBM Ultrium HH7"
comment "unable to turn off compression"
comment "Created by amtapetype; compression enabled"
comment "Have fudged amtapetype's length to account for compression on the tape
drive"
length 12876491264 kbytes
filemark 10570 kbytes
speed 204805 kps
blocksize 512 kbytes
}
define tapetype PSEUDO {
comment "IBM Ultrium HH7"
comment "unable to turn off compression"
comment "Created by amtapetype; compression enabled"
comment "Have fudged amtapetype's length to account for compression on the tape
drive"
length 15336444416 kbytes
filemark 10570 kbytes
speed 204805 kps
blocksize 512 kbytes
}
define dumptype global {
comment "Global definitions"
# tag "daily"
auth "ssh"
ssh_keys "/usr/local/etc/amanda/.ssh/id_rsa_amdump"
}
define dumptype always-full {
global
comment "Full dump of this filesystem always"
compress none
priority high
dumpcycle 0
}
# Dumptypes for gnutar
define dumptype root-tar {
global
program "GNUTAR"
comment "root partitions dumped with tar"
compress none
index
# exclude list "/usr/local/etc/amanda/exclude.gtar"
priority low
}
define dumptype user-tar {
root-tar
comment "user partitions dumped with tar"
priority medium
}
define dumptype user-tar-span {
root-tar
comment "tape-spanning user partitions dumped with tar"
priority medium
}
define dumptype high-tar {
root-tar
comment "partitions dumped with tar"
priority high
}
define dumptype comp-root-tar {
root-tar
comment "Root partitions with compression"
compress client fast
}
define dumptype comp-user-tar {
user-tar
# tag "daily"
compress client fast
}
define dumptype comp-server-user-tar {
user-tar
compress server fast
# added following 1/22/2015, CGH, this dump type applies to T5220 snapper
and marlin only
estimate calcsize
}
## CGH ##
define dumptype local-comp-user-tar {
user-tar
# tag "daily"
auth "local"
compress client fast
}
define dumptype comp-user-tar-span {
user-tar-span
compress client fast
}
define dumptype holding-disk {
global
comment "The master-host holding disk itself"
holdingdisk never # do not use the holding disk
priority medium
}
define dumptype comp-user {
global
comment "Non-root partitions on reasonably fast machines"
compress client fast
priority medium
}
define dumptype comp-user-span {
global
comment "Tape-spanning non-root partitions on reasonably fast machines"
compress client fast
priority medium
}
define dumptype nocomp-user {
comp-user
comment "Non-root partitions on slow machines"
compress none
}
define dumptype nocomp-user-span {
comp-user-span
comment "Tape-spanning non-root partitions on slow machines"
compress none
}
define dumptype comp-root {
global
comment "Root partitions with compression"
compress client fast
priority low
}
define dumptype nocomp-root {
comp-root
comment "Root partitions without compression"
compress none
}
define dumptype comp-high {
global
comment "very important partitions on fast machines"
compress client best
priority high
}
define dumptype nocomp-high {
comp-high
comment "very important partitions on slow machines"
compress none
}
define dumptype nocomp-test {
global
comment "test dump without compression, no /etc/dumpdates recording"
compress none
record no
priority medium
}
define dumptype comp-test {
nocomp-test
comment "test dump with compression, no /etc/dumpdates recording"
compress client fast
}
define dumptype custom-compress {
global
program "GNUTAR"
comment "custom client compression dumped with tar"
compress client custom
client_custom_compress "/usr/bin/bzip2"
}
define dumptype server-encrypt-fast {
global
program "GNUTAR"
comment "fast client compression and server symmetric encryption"
compress client fast
encrypt server
server_encrypt "/usr/sbin/amcrypt"
server_decrypt_option "-d"
}
define dumptype client-encrypt-nocomp {
global
program "GNUTAR"
comment "no compression and client symmetric encryption"
compress none
encrypt client
client_encrypt "/usr/sbin/amcrypt"
client_decrypt_option "-d"
}
define interface local {
comment "local disk"
use 250000 kbps
}
define interface server-rm {
comment "client in server room"
use 50000 kbps
}
define application-tool app_amgtar {
comment "amgtar"
plugin "amgtar"
property "IGNORE" "removed before we read it$"
property append "IGNORE" "changed as we read it$"
property append "IGNORE" "socket ignored$"
property append "IGNORE" "different filesystem; not dumped$"
}
define dumptype dt_amgtar {
program "APPLICATION"
application "app_amgtar"
}
## CGH ##
define dumptype gnutar-lto7-local {
tag "research"
auth "local"
program "APPLICATION"
application "app_amgtar"
compress none
}
define dumptype gnutar-lto7 {
tag "research"
program "APPLICATION"
application "app_amgtar"
auth "ssh"
ssh_keys "/usr/local/etc/amanda/.ssh/id_rsa_amdump"
compress none
}
define dumptype gnutar-data-local {
# aimed at LTO6
# tag "daily"
auth "local"
program "APPLICATION"
application "app_amgtar"
compress client fast
}
define dumptype gnutar-data {
# aimed at LTO6
# tag "daily"
program "APPLICATION"
application "app_amgtar"
auth "ssh"
ssh_keys "/usr/local/etc/amanda/.ssh/id_rsa_amdump"
compress client fast
}
define application-tool app_amstar {
comment "amstar"
plugin "amstar"
}
define dumptype dt_amstar {
program "APPLICATION"
application "app_amstar"
}
#define a script-tool to send an email
define script-tool sc-email {
comment "script-email"
plugin "script-email"
execute_on pre-dle-amcheck, pre-host-amcheck, post-dle-amcheck,
post-host-amcheck, pre-dle-estimate, pre-host-estimate, post-dle-estimate,
post-host-estimate, pre-dle-backup, pre-host-backup, post-dle-backup,
post-host-backup
execute_where server # or client
property "mailto" "martinea"
}
define interactivity inter_tty {
plugin "tty"
}
define interactivity inter_email {
plugin "email"
property "mailto" "amanda"
property "resend-delay" "0"
property "check-file" "/tmp/email_input"
#property "check-file-delay" "10"
property "check-file-delay" "1800"
}
define interactivity inter_tty_email {
plugin "tty_email"
property "mailto" "amanda"
property "resend-delay" "0"
property "check-file" "/tmp/email_input"
property "check-file-delay" "1800"
}
define taperscan taper_traditional {
comment "traditional"
plugin "traditional"
}
define taperscan taper_oldest {
comment "oldest"
plugin "oldest"
}
define taperscan taper_lexical {
comment "lexical"
plugin "lexical"
}
taperscan "taper_lexical"
-----------------------------------------------
Mon Jan 27 14:05:38.957679650 2020: pid 22004: thd-0x1dede00: amrecover: user
command: 'extract'
Mon Jan 27 14:05:38.957783190 2020: pid 22004: thd-0x1dede00: amrecover:
append_to_tapelist(tapelist=(nil), storage='research',
label='Bio-Research-027', file=-1, partnum=-1, isafile=0)
Mon Jan 27 14:05:38.957808716 2020: pid 22004: thd-0x1dede00: amrecover:
append_to_tapelist(tapelist=0x1e19b90, storage='research',
label='Bio-Research-027', file=103, partnum=-1, isafile=0)
Mon Jan 27 14:05:38.957859611 2020: pid 22004: thd-0x1dede00: amrecover:
append_to_tapelist(tapelist=(nil), storage='research',
label='Bio-Research-027', file=-1, partnum=-1, isafile=0)
Mon Jan 27 14:05:38.957874994 2020: pid 22004: thd-0x1dede00: amrecover:
append_to_tapelist(tapelist=0x1e19b90, storage='research',
label='Bio-Research-027', file=103, partnum=-1, isafile=0)
Mon Jan 27 14:05:38.957898867 2020: pid 22004: thd-0x1dede00: amrecover:
Requesting tape Bio-Research-027 from user
Mon Jan 27 14:05:51.461147197 2020: pid 22004: thd-0x1dede00: amrecover: User
prompt: 'Continue [?/Y/n/s/d]? '; response: 'y'
Mon Jan 27 14:05:51.461223044 2020: pid 22004: thd-0x1dede00: amrecover:
security_getdriver(name=local) returns 0x7ff5f183da00
Mon Jan 27 14:05:51.462157053 2020: pid 1497: thd-0x1dede00: amrecover:
Executing: /usr/bin/lsb_release '--id' '-s'
Mon Jan 27 14:05:51.524414022 2020: pid 1498: thd-0x1dede00: amrecover:
Executing: /usr/bin/lsb_release '--description' '-s'
Mon Jan 27 14:05:51.585432242 2020: pid 22004: thd-0x1dfc050: amrecover:
security_handleinit(handle=0x7ff5e8001500, driver=0x7ff5f183da00 (LOCAL))
Mon Jan 27 14:05:51.585719929 2020: pid 22004: thd-0x1dfc050: amrecover:
security_streaminit(stream=0x7ff5e800b000, driver=0x7ff5f183da00 (LOCAL))
Mon Jan 27 14:05:52.585536741 2020: pid 22004: thd-0x1dede00: amrecover:
tcpm_send_token: data is still flowing
Mon Jan 27 14:05:53.223727019 2020: pid 22004: thd-0x1dede00: amrecover:
security_streaminit(stream=0x1e21c00, driver=0x7ff5f183da00 (LOCAL))
Mon Jan 27 14:05:53.223770682 2020: pid 22004: thd-0x1dede00: amrecover:
amidxtaped_streams[0].fd = 0x1e21c00
Mon Jan 27 14:05:53.223828406 2020: pid 22004: thd-0x1dede00: amrecover:
security_streaminit(stream=0x1e29ca0, driver=0x7ff5f183da00 (LOCAL))
Mon Jan 27 14:05:53.223848206 2020: pid 22004: thd-0x1dede00: amrecover:
amidxtaped_streams[1].fd = 0x1e29ca0
Mon Jan 27 14:05:53.223898299 2020: pid 22004: thd-0x1dede00: amrecover:
security_streaminit(stream=0x1e31d40, driver=0x7ff5f183da00 (LOCAL))
Mon Jan 27 14:05:53.223916410 2020: pid 22004: thd-0x1dede00: amrecover:
amidxtaped_streams[2].fd = 0x1e31d40
Mon Jan 27 14:05:53.223932163 2020: pid 22004: thd-0x1dede00: amrecover:
security_close(handle=0x7ff5e8001500, driver=0x7ff5f183da00 (LOCAL))
Mon Jan 27 14:05:53.223949242 2020: pid 22004: thd-0x1dede00: amrecover:
security_stream_close(0x7ff5e800b000)
Mon Jan 27 14:05:53.224006823 2020: pid 22004: thd-0x1dede00: amrecover:
send_to_tape_server: FEATURES=ffffffff9efefbfffffffffffffff3fffbf71f
Mon Jan 27 14:05:53.224052534 2020: pid 22004: thd-0x1dede00: amrecover:
ignoring close stream 2
Mon Jan 27 14:05:53.224611885 2020: pid 22004: thd-0x1dede00: amrecover:
send_to_tape_server: CONFIG=daily
Mon Jan 27 14:05:53.224645659 2020: pid 22004: thd-0x1dede00: amrecover:
send_to_tape_server: LABEL=research:Bio-Research-027:103
Mon Jan 27 14:05:53.224668915 2020: pid 22004: thd-0x1dede00: amrecover:
send_to_tape_server: FSF=103
Mon Jan 27 14:05:53.224689511 2020: pid 22004: thd-0x1dede00: amrecover:
send_to_tape_server: HEADER
Mon Jan 27 14:05:53.224710364 2020: pid 22004: thd-0x1dede00: amrecover:
send_to_tape_server: DEVICE=tape:/dev/nst0
Mon Jan 27 14:05:53.224754444 2020: pid 22004: thd-0x1dede00: amrecover:
send_to_tape_server: HOST=^localhost$
Mon Jan 27 14:05:53.224775499 2020: pid 22004: thd-0x1dede00: amrecover:
send_to_tape_server: DISK=^/etc$
Mon Jan 27 14:05:53.224794892 2020: pid 22004: thd-0x1dede00: amrecover:
send_to_tape_server: DATESTAMP=20191027233002
Mon Jan 27 14:05:53.224813898 2020: pid 22004: thd-0x1dede00: amrecover:
send_to_tape_server: END
Mon Jan 27 14:05:55.315762129 2020: pid 22004: thd-0x1dede00: amrecover: get
amidxtaped line: MESSAGE Error reading Amanda header: block size too small
Mon Jan 27 14:05:55.315898183 2020: pid 22004: thd-0x1dede00: amrecover: get
amidxtaped line: FEEDME Bio-Research-027
Mon Jan 27 14:05:55.315935689 2020: pid 22004: thd-0x1dede00: amrecover:
Requesting tape Bio-Research-027 from user
---------------------------------------------