relabel

Bareos

Relabel a tape.

Synopsis

relabel [storage=<storage>] [oldvolume=<oldvolume>] [volume=<volume>]
        [pool=<pool>] [slot=<slot>] [drive=<drive>] [encrypt] [yes]

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

Description

Writes a new label onto a volume that is already in the catalog and gives it a new name. This works only for volumes with status Purged or Recycle, that is when no jobs refer to the volume any more. The Storage Daemon overwrites the medium, the old Media record is removed and a new one created. All data on the volume is lost.

oldvolume= names the existing volume and volume= the new name, which follows the same rules as for label; missing or unknown names are chosen in a dialogue. pool= restricts the selection of the old volume. yes is accepted, but relabel asks no yes/no question.

Arguments

ArgumentTypeValues / sourceDefaultFlagsDescription
storage=resourcefrom .storagesStorage name.
oldvolume=resourcefrom .mediaCurrent volume name.
volume=stringNew volume name.
pool=resourcefrom .poolsPool name.
slot=integerSlot.
drive=integerDrive number.
encryptkeywordEncrypt the volume.
yeskeywordDo not ask.

Examples

Relabel purged volume Full-0001 as Full-0101:

relabel storage=File oldvolume=Full-0001 volume=Full-0101

See also

Command reference