Storage resource

A Storage resource tells the Director how to reach a Storage Daemon and which of its devices and media type to use.

Examples

Disk storage

Storage {
  Name = File
  Address = backup.example.com
  Password = "storage-secret"
  Device = FileStorage
  Media Type = File
  Maximum Concurrent Jobs = 10
}

Directives

DirectiveTypeDefaultSummary
NamenamerequiredName of the Storage resource as jobs and pools refer to it.
DescriptionstringFree text describing the storage.
ProtocolenumNativeProtocol to the storage: Native, or NDMP for NDMP tape servers.
Auth TypeenumNoneAuthentication for NDMP storage: None, Clear or MD5.
AddressstringrequiredHost name or IP address of the Storage Daemon, as the File Daemons must reach it: the Director passes it on to the client.
Lan AddressstringAddress used instead of Address for clients in passive mode on a separate LAN.
Portpositive integer9103TCP port of the Storage Daemon.
UsernamestringUser name for NDMP authentication.
PasswordpasswordrequiredPassword shared with the Storage Daemon’s Director resource (and TLS-PSK key).
Devicestring listrequiredName of a Device (or Autochanger) resource in the Storage Daemon.
Media TypestringrequiredMedia type of the volumes this storage writes.
Auto Changeryes|nonoThe device is an autochanger (tape library); slots and barcodes are used for label, update slots and mount.
Enabledyes|noyesA disabled storage is not used for new jobs; enable/disable storage change it at run time.
Allow Compressionyes|noyesAllow software compression by the File Daemon for jobs writing here.
Heartbeat Intervaltime0Interval of keep-alive packets to the Storage Daemon. 0 switches it off.
Cache Status Intervaltime30How long the Director caches the status of the Storage Daemon.
Maximum Concurrent Jobspositive integer1How many jobs may use this storage at the same time.
Maximum Concurrent Read Jobspositive integer0How many of the concurrent jobs may read (restore, copy, migrate source); 0 means no own limit.
Paired StorageresourceFor NDMP: the native storage that holds the data of an NDMP backup that Bareos stores itself.
Maximum Bandwidth Per JobspeedLimits the bandwidth of each job on this storage.
Collect Statisticsyes|nonodeprecatedDeprecated: collect device statistics in the catalog.
NDMP Changer DevicestringChanger device of an NDMP tape server.
TLS Authenticateyes|nonoUse TLS only to authenticate the peer and switch back to an unencrypted connection afterwards.
TLS Enableyes|noyesEnable TLS for this connection.
TLS Requireyes|noyesRefuse connections that do not use TLS.
TLS Cipher ListstringOpenSSL cipher list for TLS 1.2 and older, colon separated.
TLS Cipher SuitesstringOpenSSL cipher suites for TLS 1.3, colon separated.
TLS DH FilepathPEM file with Diffie-Hellman parameters for the DH key exchange of TLS 1.2.
TLS ProtocolstringRestricts the TLS protocol versions in OpenSSL syntax, for example to forbid old versions.
TLS Verify Peeryes|nonoWith certificate based TLS: check the peer’s certificate against the CA and, for a server, against TLS Allowed CN.
TLS Ca Certificate FilepathPEM file with the CA certificates used to verify the peer’s certificate.
TLS Ca Certificate DirpathDirectory of hashed CA certificates (as made by openssl rehash), an alternative to TLS CA Certificate File.
TLS Certificate Revocation ListpathPEM file with a certificate revocation list; certificates on it are refused.
TLS CertificatepathPEM file with the own certificate for certificate based TLS.
TLS KeypathPEM file with the private key of TLS Certificate.
TLS Allowed CNstring listCommon names a peer certificate may carry; others are refused when TLS Verify Peer is on.

Name

Key: name · Type: name · Required

Name of the Storage resource as jobs and pools refer to it.

Storage {
  Name = "File"
}

In the console:

configure add storage name=File address=backup.example.com password=storage-secret device=FileStorage mediatype=File

Description

Key: description · Type: string

Free text describing the storage.

Storage {
  Name = File
  Description = "Disk storage in the server room"
}

In the console:

configure add storage name=File address=backup.example.com password=storage-secret device=FileStorage mediatype=File description="Disk storage in the server room"

Protocol

Key: protocol · Type: enum · Default: Native · Values: Native, NDMPv2, NDMPv3, NDMPv4

Protocol to the storage: Native, or NDMP for NDMP tape servers.

Storage {
  Name = File
  Protocol = Native
}

In the console:

configure add storage name=File address=backup.example.com password=storage-secret device=FileStorage mediatype=File protocol=Native

Auth Type

Key: authtype · Type: enum · Default: None · Values: None, Clear, MD5

Authentication for NDMP storage: None, Clear or MD5.

Storage {
  Name = File
  Auth Type = None
}

In the console:

configure add storage name=File address=backup.example.com password=storage-secret device=FileStorage mediatype=File authtype=None

Address

Key: address · Type: string · Aliases: SD Address · Required

Host name or IP address of the Storage Daemon, as the File Daemons must reach it: the Director passes it on to the client. Do not use localhost when clients run on other hosts.

Storage {
  Name = File
  Address = "backup.example.com"
}

In the console:

configure add storage name=File password=storage-secret device=FileStorage mediatype=File address=backup.example.com

Lan Address

Key: lanaddress · Type: string

Address used instead of Address for clients in passive mode on a separate LAN.

Storage {
  Name = File
  Lan Address = "10.0.0.5"
}

In the console:

configure add storage name=File address=backup.example.com password=storage-secret device=FileStorage mediatype=File lanaddress=10.0.0.5

Port

Key: port · Type: positive integer · Default: 9103 · Aliases: SD Port

TCP port of the Storage Daemon.

Storage {
  Name = File
  Port = 9103
}

In the console:

configure add storage name=File address=backup.example.com password=storage-secret device=FileStorage mediatype=File port=9103

Username

Key: username · Type: string

User name for NDMP authentication.

Storage {
  Name = File
  Username = "ndmp"
}

In the console:

configure add storage name=File address=backup.example.com password=storage-secret device=FileStorage mediatype=File username=ndmp

Password

Key: password · Type: password · Aliases: SD Password · Required

Password shared with the Storage Daemon’s Director resource (and TLS-PSK key).

Storage {
  Name = File
  Password = "storage-secret"
}

In the console:

configure add storage name=File address=backup.example.com device=FileStorage mediatype=File password=storage-secret

Device

Key: device · Type: string list · Required

Name of a Device (or Autochanger) resource in the Storage Daemon. It must match the name there exactly. Several devices may be listed.

Storage {
  Name = File
  Device = "FileStorage"
}

In the console:

configure add storage name=File address=backup.example.com password=storage-secret mediatype=File device=FileStorage

Media Type

Key: mediatype · Type: string · Required

Media type of the volumes this storage writes. The Director only uses volumes of this media type with it, so different kinds of media (or different directories of file storage) need different media types. It must match Media Type of the device in the Storage Daemon.

Storage {
  Name = File
  Media Type = "File"
}

In the console:

configure add storage name=File address=backup.example.com password=storage-secret device=FileStorage mediatype=File

Auto Changer

Key: autochanger · Type: yes|no · Default: no · Values: yes, no

The device is an autochanger (tape library); slots and barcodes are used for label, update slots and mount.

Storage {
  Name = File
  Auto Changer = yes
}

In the console:

configure add storage name=File address=backup.example.com password=storage-secret device=FileStorage mediatype=File autochanger=yes

Enabled

Key: enabled · Type: yes|no · Default: yes · Values: yes, no

A disabled storage is not used for new jobs; enable/disable storage change it at run time.

Storage {
  Name = File
  Enabled = yes
}

In the console:

configure add storage name=File address=backup.example.com password=storage-secret device=FileStorage mediatype=File enabled=yes

Allow Compression

Key: allowcompression · Type: yes|no · Default: yes · Values: yes, no

Allow software compression by the File Daemon for jobs writing here. Set it to no for tape drives that compress in hardware.

Storage {
  Name = File
  Allow Compression = yes
}

In the console:

configure add storage name=File address=backup.example.com password=storage-secret device=FileStorage mediatype=File allowcompression=yes

Heartbeat Interval

Key: heartbeatinterval · Type: time · Default: 0

Interval of keep-alive packets to the Storage Daemon. 0 switches it off. Times are written as a number with a unit: seconds, minutes, hours, days, weeks, months, quarters or years (abbreviations such as 30d, 12h or 1y work too); several parts add up (“1 month 15 days”), and a plain number means seconds.

Storage {
  Name = File
  Heartbeat Interval = 60
}

In the console:

configure add storage name=File address=backup.example.com password=storage-secret device=FileStorage mediatype=File heartbeatinterval=60

Cache Status Interval

Key: cachestatusinterval · Type: time · Default: 30

How long the Director caches the status of the Storage Daemon. Times are written as a number with a unit: seconds, minutes, hours, days, weeks, months, quarters or years (abbreviations such as 30d, 12h or 1y work too); several parts add up (“1 month 15 days”), and a plain number means seconds.

Storage {
  Name = File
  Cache Status Interval = 30
}

In the console:

configure add storage name=File address=backup.example.com password=storage-secret device=FileStorage mediatype=File cachestatusinterval=30

Maximum Concurrent Jobs

Key: maximumconcurrentjobs · Type: positive integer · Default: 1

How many jobs may use this storage at the same time. With disk storage and several devices it can be raised; the device’s own Maximum Concurrent Jobs in the Storage Daemon limits as well (the Director cannot read that one).

Storage {
  Name = File
  Maximum Concurrent Jobs = 10
}

In the console:

configure add storage name=File address=backup.example.com password=storage-secret device=FileStorage mediatype=File maximumconcurrentjobs=10

Maximum Concurrent Read Jobs

Key: maximumconcurrentreadjobs · Type: positive integer · Default: 0

How many of the concurrent jobs may read (restore, copy, migrate source); 0 means no own limit.

Storage {
  Name = File
  Maximum Concurrent Read Jobs = 2
}

In the console:

configure add storage name=File address=backup.example.com password=storage-secret device=FileStorage mediatype=File maximumconcurrentreadjobs=2

Paired Storage

Key: pairedstorage · Type: resource

For NDMP: the native storage that holds the data of an NDMP backup that Bareos stores itself.

Storage {
  Name = File
  Paired Storage = "File"
}

In the console:

configure add storage name=File address=backup.example.com password=storage-secret device=FileStorage mediatype=File pairedstorage=File

Maximum Bandwidth Per Job

Key: maximumbandwidthperjob · Type: speed

Limits the bandwidth of each job on this storage. Speeds take the suffixes k/s, m/s (powers of 1024) or kb/s, mb/s (powers of 1000); a plain number means bytes per second.

Storage {
  Name = File
  Maximum Bandwidth Per Job = 50 m/s
}

In the console:

configure add storage name=File address=backup.example.com password=storage-secret device=FileStorage mediatype=File maximumbandwidthperjob="50 m/s"

Collect Statistics

Key: collectstatistics · Type: yes|no · Default: no · Values: yes, no · Deprecated

Deprecated: collect device statistics in the catalog.

Storage {
  Name = File
  Collect Statistics = no
}

NDMP Changer Device

Key: ndmpchangerdevice · Type: string

Changer device of an NDMP tape server.

Storage {
  Name = File
  NDMP Changer Device = "/dev/sg0"
}

In the console:

configure add storage name=File address=backup.example.com password=storage-secret device=FileStorage mediatype=File ndmpchangerdevice=/dev/sg0

TLS Authenticate

Key: tlsauthenticate · Type: yes|no · Default: no · Values: yes, no

Use TLS only to authenticate the peer and switch back to an unencrypted connection afterwards. The data then travels in clear text, so this is meant for networks that are protected otherwise. Bareos’ default TLS-PSK setup does not need it.

Storage {
  Name = File
  TLS Authenticate = no
}

In the console:

configure add storage name=File address=backup.example.com password=storage-secret device=FileStorage mediatype=File tlsauthenticate=no

TLS Enable

Key: tlsenable · Type: yes|no · Default: yes · Values: yes, no

Enable TLS for this connection. Since Bareos 18.2 TLS is on by default and uses TLS-PSK with the password of the resource, so no certificates are needed; set it to no only for peers that cannot speak TLS.

Storage {
  Name = File
  TLS Enable = yes
}

In the console:

configure add storage name=File address=backup.example.com password=storage-secret device=FileStorage mediatype=File tlsenable=yes

TLS Require

Key: tlsrequire · Type: yes|no · Default: yes · Values: yes, no

Refuse connections that do not use TLS. With the default (yes) a peer without TLS cannot connect; set it to no only during a migration from very old clients.

Storage {
  Name = File
  TLS Require = yes
}

In the console:

configure add storage name=File address=backup.example.com password=storage-secret device=FileStorage mediatype=File tlsrequire=yes

TLS Cipher List

Key: tlscipherlist · Type: string

OpenSSL cipher list for TLS 1.2 and older, colon separated. Leave it empty to use the OpenSSL defaults; restrict it only when a security policy demands specific ciphers.

Storage {
  Name = File
  TLS Cipher List = "PSK-AES256-GCM-SHA384:PSK-AES128-GCM-SHA256"
}

In the console:

configure add storage name=File address=backup.example.com password=storage-secret device=FileStorage mediatype=File tlscipherlist=PSK-AES256-GCM-SHA384:PSK-AES128-GCM-SHA256

TLS Cipher Suites

Key: tlsciphersuites · Type: string

OpenSSL cipher suites for TLS 1.3, colon separated. Empty means the OpenSSL defaults.

Storage {
  Name = File
  TLS Cipher Suites = "TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256"
}

In the console:

configure add storage name=File address=backup.example.com password=storage-secret device=FileStorage mediatype=File tlsciphersuites=TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256

TLS DH File

Key: tlsdhfile · Type: path

PEM file with Diffie-Hellman parameters for the DH key exchange of TLS 1.2. Without it, ephemeral DH ciphers are not offered; ECDHE and PSK ciphers do not need it.

Storage {
  Name = File
  TLS DH File = "/etc/bareos/tls/dh2048.pem"
}

In the console:

configure add storage name=File address=backup.example.com password=storage-secret device=FileStorage mediatype=File tlsdhfile=/etc/bareos/tls/dh2048.pem

TLS Protocol

Key: tlsprotocol · Type: string

Restricts the TLS protocol versions in OpenSSL syntax, for example to forbid old versions. Empty means the OpenSSL default.

Storage {
  Name = File
  TLS Protocol = "-ALL, +TLSv1.2, +TLSv1.3"
}

In the console:

configure add storage name=File address=backup.example.com password=storage-secret device=FileStorage mediatype=File tlsprotocol="-ALL, +TLSv1.2, +TLSv1.3"

TLS Verify Peer

Key: tlsverifypeer · Type: yes|no · Default: no · Values: yes, no

With certificate based TLS: check the peer’s certificate against the CA and, for a server, against TLS Allowed CN. It has no effect with TLS-PSK.

Storage {
  Name = File
  TLS Verify Peer = yes
}

In the console:

configure add storage name=File address=backup.example.com password=storage-secret device=FileStorage mediatype=File tlsverifypeer=yes

TLS Ca Certificate File

Key: tlscacertificatefile · Type: path

PEM file with the CA certificates used to verify the peer’s certificate. Needed for certificate based TLS when TLS Verify Peer is on (or use TLS CA Certificate Dir).

Storage {
  Name = File
  TLS Ca Certificate File = "/etc/bareos/tls/ca.pem"
}

In the console:

configure add storage name=File address=backup.example.com password=storage-secret device=FileStorage mediatype=File tlscacertificatefile=/etc/bareos/tls/ca.pem

TLS Ca Certificate Dir

Key: tlscacertificatedir · Type: path

Directory of hashed CA certificates (as made by openssl rehash), an alternative to TLS CA Certificate File.

Storage {
  Name = File
  TLS Ca Certificate Dir = "/etc/ssl/certs"
}

In the console:

configure add storage name=File address=backup.example.com password=storage-secret device=FileStorage mediatype=File tlscacertificatedir=/etc/ssl/certs

TLS Certificate Revocation List

Key: tlscertificaterevocationlist · Type: path

PEM file with a certificate revocation list; certificates on it are refused.

Storage {
  Name = File
  TLS Certificate Revocation List = "/etc/bareos/tls/crl.pem"
}

In the console:

configure add storage name=File address=backup.example.com password=storage-secret device=FileStorage mediatype=File tlscertificaterevocationlist=/etc/bareos/tls/crl.pem

TLS Certificate

Key: tlscertificate · Type: path

PEM file with the own certificate for certificate based TLS. Goes together with TLS Key.

Storage {
  Name = File
  TLS Certificate = "/etc/bareos/tls/bareos-dir.pem"
}

In the console:

configure add storage name=File address=backup.example.com password=storage-secret device=FileStorage mediatype=File tlscertificate=/etc/bareos/tls/bareos-dir.pem

TLS Key

Key: tlskey · Type: path

PEM file with the private key of TLS Certificate. Keep it readable for the daemon user only.

Storage {
  Name = File
  TLS Key = "/etc/bareos/tls/bareos-dir.key"
}

In the console:

configure add storage name=File address=backup.example.com password=storage-secret device=FileStorage mediatype=File tlskey=/etc/bareos/tls/bareos-dir.key

TLS Allowed CN

Key: tlsallowedcn · Type: string list

Common names a peer certificate may carry; others are refused when TLS Verify Peer is on. Repeat the directive for several names.

Storage {
  Name = File
  TLS Allowed CN = "client1.example.com"
}

In the console:

configure add storage name=File address=backup.example.com password=storage-secret device=FileStorage mediatype=File tlsallowedcn=client1.example.com

See also: configuration reference, configure, show