backup@flamen:/etc/amanda/vtl$ amlabel -f -otapetype="LTO2"
-otpchanger="" -olabelstr="Vault-[1-7]" -ostorage=tape_storage vtl
Vault-7 slot 1


argument 'Vault-[1-7]': labelstr template or MATCH_AUTOLABEL expected
parse error: AUTOLABEL not set and LABELSTR set to MATCH-AUTOLABEL

I've certainly read the man page, and also have tried

backup@flamen:/etc/amanda/vtl$ amlabel --storage tape_storage --pool
tape_storage -f -olabelstr='"Vault-[1-7]"' -oautolabel='"Vault-%" any'
vtl Vault-7

which yields

Found label 'vtl18' but it doesn't match the labelstr 'vtl[0-9][0-9]*$'.
Label 'Vault-7' doesn't match the labelstr 'vtl[0-9][0-9]*$'.
Label 'Vault-7' doesn't match the labelstr 'vtl[0-9][0-9]*$'.

It is almost as if amlabel is ignoring the specific --storage option
override, choosing the default storage "vtl" no matter what.

FIXED:

amlabel --storage tape_storage --pool tape_storage -f
-olabelstr='"Vault-[1-7]"' -ostorage=tape_storage -oautolabel='"Vault-%"
any' vtl Vault-7

I don't know why --storage is ignored, unless it's accompanied with
-ostorage

Thanks for putting me on the right track José

On 2021-09-10 12:11 p.m., Jose M Calhariz wrote:
> Hi,
>
> Have you tried?
>
> amlabel -f -otapetype="LTO2" -otpchanger="" -olabelstr="Vault-[1-7]"
> -ostorage=tape_storage vtl Vault-1  slot 1
>
>
> Kind regards
> Jose M Calhariz
>
> On Fri, Sep 10, 2021 at 04:09:48AM -0400, Winston Sorfleet wrote:
>> Is there anyone here making use of amvault, who has gotten amlabel to work?
>>
>> My old, old recipe went something like this: amlabel -f -otapetype="LTO2"
>> -otpchanger="" -olabelstr="Vault-[1-7]" -otapedev="/dev/nst0" vtl Vault-1
>> slot 1
>>
>> But that doesn't work with the current amanda.conf format
>>
>> Here's my /etc/amanda/vtl/amanda.conf, which vaults fine IF I have an
>> already-labelled tape.  Note the difference between "storage" - which is vtl
>> - and "vault-storage" which should be the LTO.
>>
>> ------------------------------------------------------------------------
>>
>>
>> org "Romanus"                   # your organization name for reports
>> mailto "[email protected]" # space separated list of operators at your site
>> dumpuser "backup"
>>
>> dumpcycle 7                # the number of days in the normal dump cycle
>> runspercycle 5                 # the number of amdump runs in dumpcycle days
>>
>> tapecycle 40 tapes             # the number of tapes in rotation
>>
>> storage "vtl"
>> vault-storage "tape_storage"
>> tpchanger "archivedisks"
>> tapetype "HARDDISK"               # what kind of tape it is
>> runtapes  6                    # number of tapes to be used in a single run
>> of amdump
>>
>> define dumptype global {
>>         comment "Global definitions"
>>         auth "bsdtcp"
>> }
>>
>> #define application-tool and dumptype for the amgtar application
>> define application-tool app_amgtar {
>>     comment "amgtar"
>>     plugin  "amgtar"
>>     #property "GNUTAR-PATH" "/path/to/gtar"
>>     #property "GNUTAR-LISTDIR" "/path/to/gnutar_list_dir"
>> }
>>
>> define dumptype gui-base {
>>     global
>>     program "APPLICATION"
>>         application "app_amgtar"
>>         comment "gui base dumptype dumped with tar"
>>         compress none
>>         index yes
>> }
>>
>> define tapetype HARDDISK {
>>     comment "Virtual Tapes"
>>     length 19768960 kbytes
>>     part_size 500 mbytes
>>     part_cache_type none
>> }
>>
>> define changer LTO-2 {
>>     tpchanger "chg-single:/dev/nst0"
>>     device-property "LEOM" "TRUE"
>> }
>>
>> define changer archivedisks {
>>     tpchanger "chg-disk:/amandatapes"
>>     property "num-slot" "45"
>>     property "auto-create-slot" "yes"
>> }
>>
>> define storage "vtl" {
>>     tapedev "archivedisks"
>>     labelstr "vtl[0-9][0-9]*$"     # label constraint regex: all tapes must
>> match
>> }
>>
>> define storage "tape_storage" {
>>     erase-on-failure yes
>>     policy "HP_Robot"
>>     runtapes 1
>>     set-no-reuse no
>>     #tapedev "HP_G2"
>>     tapedev "LTO-2"
>>     tapetype "LTO2"
>>     tapepool "$r"
>>     tpchanger "LTO-2"
>>     labelstr "Vault-[1-7]"
>>     autolabel "Vault-%" any
>> }
>>
>> includefile "./advanced.conf"
>> includefile "/etc/amanda/template.d/dumptypes"
>> includefile "/etc/amanda/template.d/tapetypes"
>>
>>



Reply via email to