prune

Bareos

Prune records from catalog.

Synopsis

prune
prune files [client=<client>] [pool=<pool>] [yes]
prune jobs [client=<client>] [pool=<pool>] [jobtype=<jobtype>] [yes]
prune volume[=<volume>] [all] [pool=<pool>] [yes]
prune stats [yes]
prune directory[=<directory>] [client=<client>] [recursive] [yes]

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

Description

Removes expired catalog records, respecting the retention periods.

Subcommands

prune files

File records.

Removes file records whose File Retention has expired, for one client (client=) or for the retention of a pool (pool=); without client= the client is chosen from a list. The Director shows the retention period and asks yes/mod/no, where mod sets a different period for the running Director until the next reload; yes skips the question. Full access to the involved resources is required.

Onesimus deviation: the file records of the latest Full chain of every client and FileSet are always kept.

prune files [client=<client>] [pool=<pool>] [yes]
ArgumentTypeValues / sourceDefaultFlagsDescription
client=resourcefrom .clientsClient name.
pool=resourcefrom .poolsPool name.
yeskeywordDo not ask.

Prune expired file records of bareos-fd:

prune files client=bareos-fd yes

prune jobs

Job records.

Removes job records whose Job Retention has expired, for one client (client=), a pool (pool=) or a job type (jobtype=). The Director shows the retention period and asks yes/mod/no unless yes is given. Full access to the involved resources is required.

Onesimus deviation: the latest successful Full chain of every client and FileSet name is never pruned, even if it is older than the retention and even when job, FileSet or client are no longer configured. If that chain cannot be determined, nothing is deleted.

prune jobs [client=<client>] [pool=<pool>] [jobtype=<jobtype>] [yes]
ArgumentTypeValues / sourceDefaultFlagsDescription
client=resourcefrom .clientsClient name.
pool=resourcefrom .poolsPool name.
jobtype=stringJob type.
yeskeywordDo not ask.

Prune expired jobs using the retention of pool Incremental:

prune jobs pool=Incremental yes

prune volume

Volume records.

Removes the jobs of a volume whose Volume Retention has expired; the volume must have status Full or Used. Without a name the pool and volume are selected in a dialogue. all prunes every volume, of one pool with pool=. The Director asks yes/mod/no unless yes is given.

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

prune volume[=<volume>] [all] [pool=<pool>] [yes]
ArgumentTypeValues / sourceDefaultFlagsDescription
volume=resourcefrom .mediavalue optionalVolume name.
allkeywordEvery volume.
pool=resourcefrom .poolsPool name.
yeskeywordDo not ask.

Prune one volume without asking:

prune volume=Full-0001 yes

Prune every volume of pool Full after confirmation:

prune volume all pool=Full

prune stats

Job statistics.

Removes entries from JobHisto, DeviceStats and JobStats that are older than the Statistics Retention. The Director shows the retention period and asks unless yes is given.

prune stats [yes]
ArgumentTypeValues / sourceDefaultFlagsDescription
yeskeywordDo not ask.

Prune old statistics without asking:

prune stats yes

prune directory

Directory cache.

Removes the file records below one directory from the catalog; recursive includes subdirectories. Without client= the Director first asks whether the directory should be removed for all clients, and without a path it asks for the full path. yes skips the confirmation.

prune directory[=<directory>] [client=<client>] [recursive] [yes]
ArgumentTypeValues / sourceDefaultFlagsDescription
directory=stringvalue optionalDirectory.
client=resourcefrom .clientsClient name.
recursivekeywordWith subdirectories.
yeskeywordDo not ask.

Drop /var/cache and below from the catalog of bareos-fd:

prune directory=/var/cache client=bareos-fd recursive yes

Examples

Choose what to prune from the menu:

prune

Remove expired job records of bareos-fd:

prune jobs client=bareos-fd yes

See also

purge, Command reference