setbandwidth
Sets bandwidth.
Synopsis
setbandwidth [client=<client>] [fd=<fd>] [storage=<storage>] [sd=<sd>]
[jobid=<jobid>[,...]] [job=<job>] [ujobid=<ujobid>]
[state=<state>] [all] [limit=<limit>] [yes]
Words without brackets are required, [ ] marks optional parts, a | b alternatives, ... a repeatable argument and [,...] a comma separated list.
Description
Limits the bandwidth of a File Daemon, a Storage Daemon or running jobs without changing the configuration. The Director connects to the daemon and sends the new limit in kB/s; it applies until the daemon restarts or the job ends. limit=0 removes the limit; a missing limit is asked for. NDMP storages cannot be limited.
job=, jobid=, ujobid=, all and state= select running jobs. For backup and restore the limit is applied through the File Daemon, for copy and migrate through the reading Storage Daemon. Without client, storage or a job selection the Director asks for the client.
Arguments
| Argument | Type | Values / source | Default | Flags | Description |
|---|---|---|---|---|---|
client= | resource | from .clients | Client name. | ||
fd= | resource | from .clients | Client name (as client=). | ||
storage= | resource | from .storages | Storage name. | ||
sd= | resource | from .storages | Storage name (as storage=). | ||
jobid= | string | list | Job ID. | ||
job= | resource | from .jobs | Job name. | ||
ujobid= | string | Unique job name. | |||
state= | string | Jobs in this state. | |||
all | keyword | Every running job. | |||
limit= | integer | KiB/s (0: unlimited). | |||
yes | keyword | Do not ask. |
Examples
Throttle the File Daemon to about 10 MB/s:
setbandwidth limit=10000 client=bareos-fd
Slow down the running job 42:
setbandwidth limit=5000 jobid=42
Remove the limit again:
setbandwidth limit=0 client=bareos-fd