truncate

Bareos

Truncate purged volumes.

Synopsis

truncate volstatus=<Purged> [storage=<storage>] [pool=<pool>]
         [volume=<volume>[,...]] [drive=<drive>] [yes] [catalog=<catalog>]

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

Description

Frees the space of volumes whose jobs have already been removed (status Purged). The Director lists the matching volumes, asks for confirmation and has the Storage Daemon relabel them, which shrinks the volume file or tape to its label. The volumes stay in the catalog. Only native (non-NDMP) storages are supported, and only the volumes of one storage per call.

volstatus=Purged is required. storage=, pool= and volume= narrow the selection; an unknown storage or pool opens a selection list. drive= selects the drive, yes skips the question. Other keywords, including client= and catalog=, end with Invalid parameter. Under API 1 and 2 nothing is asked, so without yes nothing happens.

Onesimus deviation: a volume holding jobs of the latest Full chain of a client and FileSet is never truncated.

Arguments

ArgumentTypeValues / sourceDefaultFlagsDescription
volstatus=enumPurgedrequiredOnly Purged volumes.
storage=resourcefrom .storagesStorage name.
pool=resourcefrom .poolsPool name.
volume=resourcefrom .medialistVolume name.
drive=integerDrive number.
yeskeywordDo not ask.
catalog=resourcefrom .catalogsCatalog name.

Examples

Truncate all purged volumes of pool Full on File:

truncate volstatus=Purged storage=File pool=Full yes

Truncate one purged volume after confirmation:

truncate volstatus=Purged volume=Full-0003

See also

Command reference