purge
Purge records from catalog.
Synopsis
purge [catalog=<catalog>]
purge files [catalog=<catalog>] [job=<job>] [jobid=<jobid>[,...]]
[client=<client>] [volume=<volume>] [yes]
purge jobs [catalog=<catalog>] [client=<client>] [volume=<volume>]
[pool=<pool>] [jobstatus=<jobstatus>[,...]] [yes]
purge volume[=<volume>] [catalog=<catalog>] [all] [pool=<pool> | allpools]
[volstatus=<volstatus>[,...]] [storage=<storage>]
[devicetype=<devicetype>] [drive=<drive>]
[action=<truncate|all>] [dryrun | yes]
purge quota [catalog=<catalog>] [client=<client>] [yes]
Words without brackets are required, [ ] marks optional parts, a | b alternatives, ... a repeatable argument and [,...] a comma separated list.
Description
Deletes catalog records without regard to retention periods. It needs full access to every resource.
purge volume all (Onesimus extension) purges every volume of one pool (pool=) or of all pools the console may access (allpools) whose status is one of volstatus= (default Full,Used,Error). It is never interactive: dryrun only shows what would be purged, yes purges.
Arguments
| Argument | Type | Values / source | Default | Flags | Description |
|---|---|---|---|---|---|
catalog= | resource | from .catalogs | Catalog name. |
These arguments apply to every subcommand as well.
Subcommands
purge files
File records.
Deletes file records from the catalog regardless of retention periods, for one job (job= or jobid=), a client or a volume; the jobs themselves stay. Like every purge it prints a warning, needs full access to all resources and cannot be undone.
Onesimus deviation: the file records of the latest Full chain of a client and FileSet are skipped, and each purge runs in one transaction whose errors are reported instead of ignored.
purge files [catalog=<catalog>] [job=<job>] [jobid=<jobid>[,...]]
[client=<client>] [volume=<volume>] [yes]
| Argument | Type | Values / source | Default | Flags | Description |
|---|---|---|---|---|---|
job= | resource | from .jobs | Job name. | ||
jobid= | string | list | Job IDs. | ||
client= | resource | from .clients | Client name. | ||
volume= | resource | from .media | Volume name. | ||
yes | keyword | Do not ask. |
Also accepts the arguments of purge: catalog.
Purge the file records of job 599:
purge files jobid=599
Purge all file records of bareos-fd:
purge files client=bareos-fd yes
purge jobs
Job records.
Deletes whole jobs with all their records regardless of retention periods, for a client, a volume or a pool. jobstatus= limits this to jobs with the given status letters (T, E, f, …) or names such as error, separated by commas. The Director counts the jobs and asks Purge (yes/no)? unless yes is given. A volume left without jobs becomes Purged.
Onesimus deviation: jobs of the latest Full chain of a client and FileSet are skipped, and each purge runs in one transaction whose errors are reported.
purge jobs [catalog=<catalog>] [client=<client>] [volume=<volume>]
[pool=<pool>] [jobstatus=<jobstatus>[,...]] [yes]
| Argument | Type | Values / source | Default | Flags | Description |
|---|---|---|---|---|---|
client= | resource | from .clients | Client name. | ||
volume= | resource | from .media | Volume name. | ||
pool= | resource | from .pools | Pool name. | ||
jobstatus= | string | list | Job status letters. | ||
yes | keyword | Do not ask. |
Also accepts the arguments of purge: catalog.
Purge every job on volume Full-0001:
purge jobs volume=Full-0001 yes
Purge the failed jobs of pool Incremental:
purge jobs pool=Incremental jobstatus=E,f
purge volume
Volume records.
Deletes every job on a volume from the catalog regardless of retention; the volume then becomes Purged and can be reused. Several volume= may be given, and each is confirmed on its own unless yes is given. action=truncate or all runs the ActionOnPurge on Purged volumes through the Storage Daemon, with storage=, pool= or allpools, devicetype= and drive=. A volume holding the latest Full chain of a client is never purged (Onesimus).
Onesimus extension: purge volume all purges every volume of pool= or of all permitted pools (allpools) whose status is in volstatus=, by default Full, Used and Error. Purged and Recycle volumes are never selected and Cleaning tapes cannot be purged. It never asks: exactly one of dryrun (preview) and yes is required, and refused volumes are skipped with their reason.
purge volume[=<volume>] [catalog=<catalog>] [all] [pool=<pool> | allpools]
[volstatus=<volstatus>[,...]] [storage=<storage>]
[devicetype=<devicetype>] [drive=<drive>]
[action=<truncate|all>] [dryrun | yes]
| Argument | Type | Values / source | Default | Flags | Description |
|---|---|---|---|---|---|
volume= | resource | from .media | value optional | Volume name. | |
all | keyword | Every volume of the pool selection (Onesimus). | |||
pool= | resource | from .pools | one of: scope | Pool name. | |
allpools | keyword | one of: scope | Every pool. | ||
volstatus= | enum | Full, Used, Error, Append, Archive, Disabled, Read-Only | list | Volume status (Onesimus); Purged and Recycle volumes are never selected, Cleaning tapes cannot be purged. | |
volume= | resource | from .media | repeatable | Volumes for action= (several allowed). | |
storage= | resource | from .storages | Storage name. | ||
devicetype= | string | Device type. | |||
drive= | integer | Drive number. | |||
action= | enum | truncate, all | Action on purge. | ||
dryrun | keyword | one of: mode | Only show what would be purged (Onesimus). | ||
yes | keyword | one of: mode | Do not ask. |
Also accepts the arguments of purge: catalog.
Truncate the purged volumes of pool Full:
purge volume action=truncate storage=File pool=Full
Preview purging the Error volumes of Incremental (Onesimus):
purge volume all pool=Incremental volstatus=Error dryrun
purge quota
Quota of a client.
Resets the quota counters of a client; without client= the client is chosen from a list. Like every purge it prints a warning and needs full access to all resources.
purge quota [catalog=<catalog>] [client=<client>] [yes]
| Argument | Type | Values / source | Default | Flags | Description |
|---|---|---|---|---|---|
client= | resource | from .clients | Client name. | ||
yes | keyword | Do not ask. |
Also accepts the arguments of purge: catalog.
Reset the quota of bareos-fd:
purge quota client=bareos-fd
Examples
Purge one volume:
purge volume=Full-0001 yes
Show what would be purged (Onesimus):
purge volume all pool=Full volstatus=Full,Used dryrun
Purge every Full, Used or Error volume (Onesimus):
purge volume all allpools yes
Choose what to purge from the menu:
purge
Purge the failed jobs of bareos-fd:
purge jobs client=bareos-fd jobstatus=E