label

Bareos

Label a tape.

Synopsis

label [storage=<storage>] [sd=<sd>] [volume=<volume>] [pool=<pool>]
      [slot=<slot>[,...]] [catalog=<catalog>] [slots=<slots>] [drive=<drive>]
      [barcodes] [barcode] [encrypt] [yes] [device=<device>]

Words without brackets are required, [ ] marks optional parts, a | b alternatives, ... a repeatable argument and [,...] a comma separated list.

Description

Writes a Bareos label onto a new medium (file or tape) through the Storage Daemon and creates the matching Media record in the catalog. Only a labelled volume can be used for backups. The command changes both the medium and the catalog. Missing values are asked for: storage, volume name, slot and pool.

Volume names may contain letters, digits and :.-_/ but must not start with /. slot= greater than 0 also sets the InChanger flag; on an autochanger without slot= the Director asks for the slot. drive= selects the drive and defaults to 0. encrypt creates a new key for hardware (LTO) encryption and stores it in the catalog.

barcodes labels every volume of an autochanger with the name read from its barcode; slots= restricts this to a slot list such as 1-5,8, and yes answers the confirmation question. Only autochanger storages qualify.

Arguments

ArgumentTypeValues / sourceDefaultFlagsDescription
storage=resourcefrom .storagesStorage name.
sd=resourcefrom .storagesStorage name (as storage=).
volume=stringVolume name.
pool=resourcefrom .poolsPool name.
slot=stringlistSlot.
catalog=resourcefrom .catalogsCatalog name.
slots=stringSlots (list or ranges).
drive=integerDrive number.
barcodeskeywordUse the barcodes as names.
barcodekeywordUse the barcodes as names.
encryptkeywordEncrypt.
yeskeywordDo not ask.
device=stringDevice name.

Examples

Label one file volume into pool Full:

label storage=File volume=Full-0001 pool=Full

Label slots 1 to 5 with their barcodes, without asking:

label barcodes storage=Autochanger pool=Scratch slots=1-5 yes

See also

Command reference