📜 ⬆️ ⬇️

About how I spent a week in Bareos

The task came to me to organize backup from the GUI and to make it just like the big guys. Previously, there was rsnapshot and everything worked wonderfully until the volumes increased to hundreds of gigabytes, websites and databases, hundreds of test sites. The server fleet has increased and it has become difficult to manage the whole thing. Of all the existing solutions, we chose open source and settled on bareos as the one most often used, so that if something happens, quickly google it.

There was a server under Centos 7 OS, raid5 12Tb. I started with the installation and immediately ran into the fact that someone had already tried to install bareos before me. In order not to suffer and to remake from scratch turned off the demons mariadb, bareos-sd, bareos-fd, bareos-dir.

sudo systemctl stop mariadb bareos-dir bareos-sd bareos-fd 

And deleted the old configs:

 sudo systemctl stop mariadb sudo rm -rf /etc/bareos/* sudo rm -rf /etc/bareos/.* #         mysql -uroot -p -e "DROP DATABASE IF EXISTS 'bareos';" 

If you do not know the root password:
')
Reset root mysql password
 sudo systemctl stop mariadb sudo mysqld_safe --skip-grant-tables & mysql -uroot -e "UPDATE mysql.user SET Password=PASSWORD('__') WHERE User='root';" sudo systemctl restart mariadb 


In case we have not installed bareos and mariadb yet.
Add the bareos repository:

 sudo wget http://download.bareos.org/bareos/release/latest/CentOS_7/bareos.repo -O /etc/yum.repos.d/bareos.repo && sudo sed -i 's/7/\$releasever/g' /etc/yum.repos.d/bareos.repo && sudo sed -i 's/\/1...\//\/latest\//g' /etc/yum.repos.d/bareos.repo 

Install the bareos and mariadb packages:

 sudo yum install -y bareos-client bareos-database-tools bareos-filedaemon bareos-database-mysql bareos bareos-bconsole bareos-database-common bareos-storage bareos-director bareos-common mariadb-server sudo systemctl enable mariadb && sudo systemctl enable bareos-fd && sudo systemctl enable bareos-sd && sudo systemctl enable bareos-dir && sudo systemctl start mariadb sudo mysql_secure_installation 

Create a bareos database:

 /usr/lib/bareos/scripts/create_bareos_database /usr/lib/bareos/scripts/make_bareos_tables -uroot -p /usr/lib/bareos/scripts/grant_bareos_privileges -uroot -p 

Now we have a database and user bareos. These scripts create a user without a password, specify the password for bareos:

 mysql -uroot -e "UPDATE mysql.user SET Password=PASSWORD('__') WHERE User='bareos';" 


Well, primitive ended, now what was actually plugging. I always knew that linux is built from a huge number of simple pieces. It seemed to me difficult to understand how to configure bareos, and this is why. In many manuals on the Internet, the configuration settings for the bareula bacula ancestor are described, and the documentation is written in such a way that in 3 seconds you don’t understand what to shove. Many manuals have errors, in one I did not understand at all why the job section is placed in the storage daemon. Having smoked all the documentation on bareos and bacula, I realized that if I want to understand, I’ll have to draw each section on a piece of paper and what it does with a complete description of all the parameters and connections between the demons.

Communication scheme with off. documentation
image

So, let's go slowly in pieces. Forget about all the demons and other stubs except mariadb and bareos-dir. All the basic functionality is described in the bareos-dir.conf config located in the / etc / bareos / directory. Directory rights must be 770, the owner of the root group is bareos. The rights to files in the directory must be 640, the owner of the root group is bareos, if you use subdirectories - do not forget that the execution bit for the directory allows you to view the contents of the directory, therefore the rights of the subdirectories must also be 770, the owner of the root group bareos.

/etc/bareos/bareos-dir.conf
# Comments begin on grid, required parameters are not commented out
Director {# beginning of the description of the server section
Name = agima-dir # Name of this server
#WorkingDirectory = "$ HOME / bareos / bin / working" # This is the working directory
#Pid Directory = "$ HOME / bareos / bin / working" # Location of the PID file
QueryFile = "/usr/lib/bareos/scripts/query.sql" # set of sql queries for working with metadata
#Maximum Concurrent Jobs = 10 # Maximum number of simultaneously running tasks
Password = "password" # Password to access this server
#Description = "Main Bareos Director" # Server Description
Messages = Daemon # specify the name of the message generation section
#Auditing = yes # record actions performed on the server (input, start a task, restore, etc.). This separate parameter spun off the Messages parameter.
#FD Connect Timeout = 180 # time how much to expect a client response
#SD Connect Timeout = 1800 # how long to wait for a response from the storage server
#Maximum Connections = 30 # maximum number of simultaneous connections to this server
#Maximum Console Connections = 30 # maximum number of consoles connected simultaneously to this server

#Dir Address = 1.2.3.4 9101 # is a domain name or ip address, the port must be specified through a space or in a separate parameter

#Dir Addresses = {# To specify several specific domains and / or ip addresses
# ip = {addr = 1.2.3.4; port = 1205;}
# ipv4 = {addr = 1.2.3.4; port = http;}
# ipv6 = {addr = 201: 220: 222 :: 2; port = 1205; }
# ip = {addr = server.example.com}
#}

#Dir Port = 9101 # port number on which the server will listen
}
# From the @ symbol begin to insert (include) other files
# If you want to insert several files from the directory, you can use the construction below.
# @ | "Sh -c 'for f in /etc/bareos/jobs/*.conf; do echo @ $ {f}; done '"
#@/etc/bareos/jobs/1.conf

# Not all the parameters of the Director section are listed in the file, a more complete list can be obtained on the official website of the program bareos.org

We have described the server, now we can start it:

 systemctl start bareos-dir 

The server is there, it works, but it does nothing and it has no place to put our backups. The bareos-sd daemon is responsible for posting files, its configuration file is called bareos-sd.conf:

/etc/bareos/bareos-sd.conf
Storage {# beginning of the storage daemon description section
#Absolute Job Timeout = 20 # full task timeout
#Allow Bandwidth Bursting = no # allow increasing channel width
#Client Connect Wait = 1800 # time how much to expect console response
#Collect Device Statistics = no # collect statistics on devices
#Collect Job Statistics = no # collect task statistics
#Compatible = no # bacula compatibility mode
Description = "First storage server" # Server Description
#FD Connect Timeout = 1800 # time how much to expect a client response
#File Device Concurrent Read = no # enable simultaneous read from devices
#Maximum Bandwidth Per Job = 1 k / s # Maximum channel width for 1 task, speed values ​​k / s, kb / s, m / s or mb / s.
#Maximum Concurrent Jobs = 20 # Maximum number of simultaneous tasks
#Maximum Network Bu ff er Size = 65536 # size of network buffer in bytes, if low speed try to change. Sometimes to increase the speed it is worth reducing the buffer size.
Messages = Standard # specify the name of the message generation section
Name = agima-sd # name of this storage server
#Pid Directory = / var / lib / bareos # Location of the PID file
#SD Address = 1.2.3.4 9103 # domain name or ip address, the port must be specified through the space or in a separate parameter

#SD Addresses = {# To specify several specific domains and / or ip addresses
# ip = {addr = 1.2.3.4; port = 1205;}
# ipv4 = {addr = 1.2.3.4; port = http;}
# ipv6 = {addr = 201: 220: 222 :: 2; port = 1205; }
# ip = {addr = server.example.com}
#}

#SD Connect Timeout = 1800 # Maximum connection timeout
#SD Port = 9103 # port number on which the server will listen
#SD Source Address = # specific (separate) address that the server listens to for communication with the client
#Secure Erase Command = string # parameter to specify which command to use for permanent deletion
#Statistics Collect Interval = 30 # interval for collecting statistics
#Working Directory = / var / lib # working directory
}

Director {#beginning of the description of the connection section to this storage server
Name = agima-dir # specify the name of the server that can connect to us
Password = "password1" # password with which will connect
Description = "Backup server" # Description of the server
#Key Encryption Key = password # data encryption key
#Maximum Bandwidth Per Job = 1 k / s # Maximum channel width for 1 task, speed values ​​k / s, kb / s, m / s or mb / s.
#Monitor = no # Allows full or limited access to the server. Restricted access only allows you to view the status of the server.
}

Device {# beginning of storage location description
Always Open = no; # Always keep the device open
Archive Device = / opt / backup # Save Path
#Auto De fl ate = out # The parameter works only when the autox ate-sd module is turned on. Values: in - compression of streams when reading from the device, out compression when writing to the device, both compressing in both cases.
#Auto De fl ate Algorithm = GZIP # GZIP - gzip level 1–9, LZO, LZFAST, LZ4, LZ4HC
#Auto De fl ate Level = 6 # compression level
#Auto In fl ate = in # The parameter works only when the autox ate-sd module is turned on. Values: in - compression of streams when reading from the device, out compression when writing to the device, both compressing in both cases.
#Auto Select = yes # Automatic selection of this device
#Automatic Mount = yes; # automatically mount device
#Block Checksum = yes # Enables CRC32 checksum checking, also allows you to read broken data
#Check Labels = yes # Enables label checking for non-ANSI format entries.
#Close On Poll = no # remount device
#Collect Statistics = yes # Collect statistics
Description = "Primary raid storage" Device Description
#Device Options = string # device options are used for Ceph and GlusterFS external plugins
Device Type = File # Device Type: Tape Cassettes; File flash drives, network drives; GFAPI (GlusterFS); Rados (Ceph Object Store); Fifo devices follow access read-only or write-only.
Label Media = yes; # allow the server to set the label on the blocks / accept Bareos set label unlabeled media
Label Type = primary # label to be set
Maximum Concurrent Jobs = 4 # maximum number of simultaneous tasks
Maximum File Size = 500 Gb # maximum file size
#Maximum Job Spool Size = # Maximal Task Queue Size
#Maximum Network Bu ff er Size = 65536 # size of network buffer in bytes, if low speed try to change. Sometimes to increase the speed it is worth reducing the buffer size.
Maximum Open Volumes = 1 # maximum number of open volumes
Maximum Open Wait = 15 # maximum device wait time
#Maximum Spool Size = # Maximum amount of task queue
Media Type = File # is a text parameter where you can freely specify the type of device you like best
#Mount Command = Strname # mount command of this device
#Mount Point = Strname # mount point
Name = AgimaStorage # name of this storage location
Random Access = yes; # indicates support for random data access; tapes do not have this capability
Removable Media = no; # specify if the device is turned off
Requires Mount = no # whether this device should be mounted
#Spool Directory = directory # Directory for creating temporary files, default is working directory
#Unmount Command = Strname # unmount command
#Volume Capacity = # volume size
}

Messages {
Name = Standard # name of the current notification
Description = "Standard messages file daemon" # description of the notification
#Mail Command = # command to send email, must be described before the parameters Mail, Mail On Error, Mail On Success
#Mail Command = "/ usr / sbin / bsmtp -h mail.example.com -f \" \ (Bareos \) \% r \ "-s \" Bareos: \% t ​​\% e of \% c \% l \ "\% r"

## %% =% percent symbol
##% c = Client's name \ Client name
##% d = Director's name \ Server Name
##% e = Job Exit code (OK, Error, ...) \ Completion Status
##% h = Client address \ client host
##% i = Job Id \ Task ID
##% j = Unique Job name \ Unique task name
##% l = Job level \ task priority
##% n = Job name \ Task name
##% r = Recipients \ Recipients
##% s = Since time \ # I will be glad if someone explains what this parameter means
##% t = Job type (eg Backup, ...) \ Task Type
##% v = Read Volume name (Only on director side) \ Read volume with name
##% V = Write Volume name (Only on director side) \ Volume with name is written

#Operator Command = string # must be described before the Operator parameter. Same as Mail Command, but sends to operator

## Notification types message-type:
## info info messages
## warning Notifications
## error errors
## fatal errors due to which tasks stop
## terminate message when server is shut down
## notsaved files not saved
## skipped skipped files that fall into exceptions either during an incremental backup or with other settings or user actions
## mount mount completed
## restored list of recovered files
## all all posts
## security info and warning messages only when trying to connect
## alert messages generated by tape alerts
## volmgmt volume management messages
## audit action messages

#Append = [address =] message-type [, message-type] * # Add a message to the file, if the file does not exist, it will be created
director = backup-dir = all # sending a message to the bareos server
#Catalog = # send message to the catalog database
#Console = # send message to console
#File = # sending a message to a file, if the file exists, it will be overwritten
#Mail = # send message to the specified address
#Mail On Error = # email on error
#Mail On Success = email on success
#Operator = # send email to the specified address to the operator
#Stderr = # send message to standard error output
#Stdout = # send message to standard output
#Syslog = # send syslog message
}

So now we set up the storage server, connect it to our server, add to the end of the file:

/etc/bareos/bareos-dir.conf
Storage {
Address = 127.0.0.1 # address to connect to
Allow Compression = yes Whether to allow compression
#Auth Type = MD5 # authorization method None | Clear | MD5
#Collect Statistics = yes # Whether to collect statistics
Description = "Primary storage" # Description of the current section
Device = FirstStorage # device used, the value is equal to the name parameter of the device section
Enabled = yes # whether the storage server is enabled
#Maximum Bandwidth Per Job = 1 k / s # Maximum channel width for 1 task, speed values ​​k / s, kb / s, m / s or mb / s.
#Maximum Concurrent Jobs = 1 # maximum number of simultaneous tasks
#Maximum Concurrent Read Jobs = 0 # maximum number of simultaneous tasks per reading
Media Type = File # is a text parameter where you can freely specify the type of device which one you like best
Name = agima-sd # name of this section
Password = password1 # password to connect to the storage server
#Port = 9103 # port to connect to
}

Catalog {
DB Address = localhost # Database Network Address
DB Driver = mysql # Select DBMS postgresql | mysql | sqlite
DB Name = bareos # Database Name
DB Password = "123" # User Password for DBMS
DB Port = 3306 # Port on which the database is running
#DB Socket = string # path to the Database socket, if we use a socket
DB User = bareos # Subd user DBMS
Description = "Catalog metadata for bareos" # Description Sections
Disable Batch Insert = no # Enables multiple inserts
#Exit On Fatal = no # close the program on error
#Idle Timeout = 30 # Waiting time for communication with the base
#Inc Connections = 1 # If free connections have ended, you can add how much is specified in this parameter
#Max Connections = 5 # Maximum number of connections
#Min Connections = 1 # Minimum number of connections
Name = agima-meta # Name of the current section
Reconnect = yes # Reconnect to the database if the connection is broken
#Validate Timeout = 120 # Time to check if the database is working or not
}


Reboot the server and start storage:

 sudo systemctl restart bareos-dir sudo systemctl start bareos-sd 

If there is no connection between them, configure the firewall.

Now we have a server and a place to put backups. Servers are running, but there is no one to back up. Set up a client who will make backups. The client is the bareos-fd daemon, its configuration file is called bareos-fd.conf and it is the simplest:

/etc/bareos/bareos-fd.conf
Client {
#Absolute Job Timeout = 20 # full task timeout
#Allow Bandwidth Bursting = yes # allow increasing channel width
#Allowed Job Command = # Types of allowed commands for this client: backup creating backups; restore restore files; verify file verification; estimate check allowed commands; runscript running scripts
#Allowed Script Dir = # Directories from which the client is allowed to run scripts
#Compatible = no # bacula compatibility mode
Description = "First client on server example.com" # client description
#FD Address = 1.2.3.4 9102 # domain name or ip address, the port must be specified through a space or in a separate parameter
#FD Addresses = {# To specify several specific domains and / or ip addresses
# ip = {addr = 1.2.3.4; port = 1205;}
# ipv4 = {addr = 1.2.3.4; port = http;}
# ipv6 = {addr = 201: 220: 222 :: 2; port = 1205; }
# ip = {addr = server.example.com}
#}
#FD Port = 9102 # port number on which the client will listen
#FD Source Address = # specific (separate) address that the client listens to in order to communicate with the storage server
#Maximum Bandwidth Per Job = 1 k / s # Maximum channel width for 1 task, speed values ​​k / s, kb / s, m / s or mb / s.
#Maximum Concurrent Jobs = 20 # Maximum number of simultaneous tasks
#Maximum Network Bu ff er Size = 65536 # size of network buffer in bytes, if low speed try to change. Sometimes to increase the speed it is worth reducing the buffer size.
Messages = standard # specify the name of the message generation section
Name = agima-client # Name of this client
#Pid Directory = / var / lib / bareos # PID file storage directory
#Scripts Directory = directory # Directory where scripts are stored
#SD Connect Timeout = 1800 # Timeout for connecting to the storage server
#Secure Erase Command = string # Command to return permanently
#Working Directory = / var / lib / bareos # Working Directory
}

Director {
#Address = 1.2.3.4 # Address to which we are connecting
#Allowed Job Command = # Types of allowed commands for the server: backup creating backups; restore restore files; verify file verification; estimate check allowed commands; runscript running scripts
#Allowed Script Dir = "/ etc / bareos" # Directories from which the server is allowed to run scripts
#Allowed Script Dir = "/ path / that / is / also / allowed" #
Description = "General backup server" # Server Description
#Maximum Bandwidth Per Job = 1 k / s # Maximum channel width for 1 task, speed values ​​k / s, kb / s, m / s or mb / s.
#Monitor = no # Allows full or limited access to the server. Restricted access only allows you to view the status of the server.
Name = backup-dir # Name of the server that can connect
Password = Md5password # password to connect to the client encrypted in md5
}

Messages {
Name = Standard # name of the current notification
Description = "Standard messages file daemon" # description of the notification
#Mail Command = # command to send email, must be described before the parameters Mail, Mail On Error, Mail On Success
#Mail Command = "/ usr / sbin / bsmtp -h mail.example.com -f \" \ (Bareos \) \% r \ "-s \" Bareos: \% t ​​\% e of \% c \% l \ "\% r"

## %% =% percent symbol
##% c = Client's name \ Client name
##% d = Director's name \ Server Name
##% e = Job Exit code (OK, Error, ...) \ Completion Status
##% h = Client address \ client host
##% i = Job Id \ Task ID
##% j = Unique Job name \ Unique task name
##% l = Job level \ task priority
##% n = Job name \ Task name
##% r = Recipients \ Recipients
##% s = Since time \ # I will be glad if someone explains what this parameter means
##% t = Job type (eg Backup, ...) \ Task Type
##% v = Read Volume name (Only on director side) \ Read volume with name
##% V = Write Volume name (Only on director side) \ Volume with name is written

#Operator Command = string # must be described before the Operator parameter. Same as Mail Command, but sends to operator

## Notification types message-type:
## info info messages
## warning Notifications
## error errors
## fatal errors due to which tasks stop
## terminate message when server is shut down
## notsaved files not saved
## skipped skipped files that fall into exceptions either during an incremental backup or with other settings or user actions
## mount mount completed
## restored list of recovered files
## all all posts
## security info and warning messages only when trying to connect
## alert messages generated by tape alerts
## volmgmt volume management messages
## audit action messages

#Append = [address =] message-type [, message-type] * # Add a message to the file, if the file does not exist, it will be created
director = backup-dir = all # sending a message to the bareos server
#Catalog = # send message to the catalog database
#Console = # send message to console
#File = # sending a message to a file, if the file exists, it will be overwritten
#Mail = # send message to the specified address
#Mail On Error = # email on error
#Mail On Success = email on success
#Operator = # send email to the specified address to the operator
#Stderr = # send message to standard error output
#Stdout = # send message to standard output
#Syslog = # send syslog message
}

Hurray we described the client, now connect it to our server, insert it at the end of the bareos-dir.conf file:

/etc/bareos/bareos-dir.conf
Client {
#Allow Client Connect = yes # allow incoming connections from client
#Auth Type = MD5 # Authorization Type None | Clear | MD5
#Auto Prune = no #
#Catalog = resource-name #
#Description = string #
#Enabled = yes #
#FD Address = string #
#FD Password = password #
#FD Port = 9102 #
#File Retention = 5184000 #
#Hard Quota = 0 # ,
#Job Retention = 15552000 #
#Maximum Bandwidth Per Job = 1 k/s # 1 , k/s, kb/s, m/s or mb/s.
#Maximum Concurrent Jobs = 1 #
#Name = agima-client #
#Passive = no # ,
#Quota Include Failed Jobs = yes #
#Soft Quota = 0 # ,
}


We start the client, restart the server and as usual do not forget to configure the firewall.

 sudo systemctl restart bareos-dir sudo systemctl start bareos-fd 

Now we have everything, but backups are not made anyway. Add tasks and schedule for their execution.

Expand
Pool {
#Action On Purge = Truncate #
Auto Prune = yes #
Catalog = resource-name #
Catalog Files = yes #
Description = string #
#File Retention = time #
#Job Retention = time #
Label Format = «backup-» #
#Label Type = ANSI|IBM|Bareos #
#Maximum Blocksize = positive-integer # 63B
Maximum Volume Bytes = Size64 # ( )
Maximum Volume Files = positive-integer #
Maximum Volume Jobs = positive-integer #
Maximum Volumes = positive-integer #
Name = agima-pool #
Pool Type = Strname # Backup, *Archive, *Cloned, *Migration, *Copy, *Save
Purge Oldest Volume = yes #
Recycle = yes # ,
Recycle Current Volume = yes #
Recycle Oldest Volume = yes #
Recycle Pool = resource-name # ,
Scratch Pool = resource-name # Scratch —
Storage = ResourceList #
Use Catalog = yes #
Volume Retention = 31536000 #
Volume Use Duration = 7 days #
}

FileSet { #
Description = string #
#Enable VSS = yes # Windows
Name = agima-site#
# Exclude { #
# Options {
# AutoExclude = yes # Windows. .
# fstype=ext2 # . ext2, jfs, ntfs, proc, reiserfs, xfs, usbdevfs, sysfs, smbfs, iso9660
# sparse=yes # raw 32
# onefs=yes # 1
# signature=MD5 # SHA1 .
# recurse=yes #
# noatime=yes #
# mtimeonly=yes # st_mtime. st_ctime.
# keepatime=yes #
# checkfilechanges=yes #
# aclsupport=yes #
# xattrsupport=yes #
# ignore case=yes #
# DriveType=Windows-drive-type # Windows: removable, fixed, remote, cdrom, ramdisk
# hfsplussupport=yes # apple

# size=
#- — Select file in range size — size. #
#<size — Select files smaller than size. #
#>size — Select files bigger than size. #
#size — Select files which are within 1 % of size. # ± 1%

# verify=
#i compare the inodes #
#p compare the permission bits #
#n compare the number of links #
#u compare the user id #
#g compare the group id #
#s compare the size #
#a compare the access time #
#m compare the modification time (st_mtime) #
#c compare the change time (st_ctime) #
#d report file size decreases #
#5 compare the MD5 signature # MD5
#1 compare the SHA1 signature # SHA1
#A Only for Accurate option, it allows to always backup the file # Accurate ( , / )

# compression=GZIP5 # GZIP1-9|LZO|LZFAST|LZ4|LZ4HC
# }
# File = "|sh -c 'df -l | grep \"^/dev/hd[ab]\" | grep -v \".*/tmp\" | awk \"{print \$6}\"'"
# File = /
# File = /usr
# }
Ignore File Set Changes = no # , . yes .
# Include { #
# Options {
# File = /
# File = /usr
# Exclude Dir Containing = .nobackup #
# }
}

Schedule {
Description = string #
Enabled = yes #
Name = MonthlyCycle #
Run = Level=Full Pool=Monthly 1st sun at 2:05
Run = Level=Differential 2nd-5th sun at 2:05
Run = Level=Incremental Pool=Daily mon-sat at 2:05
# jan | feb | mar | apr | may | jun | jul | aug | sep | oct | nov | dec | january | february |… | december | monthly
# sun | mon | tue | wed | thu | fri | sat | sunday | monday | tuesday | wednesday | thursday | friday | saturday | daily
# 1st | 2nd | 3rd | 4th | 5th | first | second | third | fourth | fifth | last
# «at 00:00»
# w00 | w01 |… w52 | w53
# "-"
}

Job {
Accurate = yes # , ,
Add Prefix = string #
Add Suffix = string #
Allow Duplicate Jobs = yes #
Allow Higher Duplicates = yes # ,
Allow Mixed Priority = no # ,
Base = ResourceList # , , . .
Bootstrap = directory # ,

#%% — %
#%c —
#%d —
#%e — (OK, Error, Fatal Error, Canceled, Differences, Unknown term code)
#%i —
#%j —
#%l —
#%n —
#%s — (?)
#%t —
#%v —

Cancel Lower Level Duplicates = yes # ,
Cancel Queued Duplicates = yes # ,
Cancel Running Duplicates = yes # ,
Catalog = agima-meta #
Client = agima-client #
Client Run After Job = RunscriptShort #
Client Run Before Job = RunscriptShort #
Description = string #
Differential Backup Pool = agima-pool #
Differential Max Runtime = time #
Enabled = yes #
File Set = agima-site #
Full Backup Pool = agima-pool #
Full Max Runtime = time #
Incremental Backup Pool = agima-pool #
#Incremental Max Runtime = time #
#Job Defs = resource-name # .
#Job To Verify = resource-name #
Level = BackupLevel # : VirtualFull | Full | Incremental | Differential, InitCatalog | Catalog | VolumeToCatalog | DiskToCatalog , Restore.
Max Concurrent Copies = 100 #
Max Diff Interval = time # ,
Max Full Interval = time # ,
Max Run Time = time #
Max Start Delay = time #
Max Virtual Full Interval = time # ,
Max Wait Time = time #
Maximum Bandwidth = k/s # , k/s, kb/s, m/s or mb/s.
Maximum Concurrent Jobs = 1 #
Maxrun Sched Time = time # (Max Start Delay + Max Run Time)
Messages = standard required #
Name = agima-site required #
#Next Pool = resource-name #
Pool = agima-pool #
Prefer Mounted Volumes = yes #
Prefix Links = no # « »
Priority = 10 # . 1-255
Prune Files = no #
Prune Jobs = no #
Prune Volumes = no #
Purge Migration Job = no #
Regex Where = string #
Replace = Always # always — , ifnewer — , never — , ifolder —
Rerun Failed Levels = yes #
Reschedule Interval = 1800 #
Reschedule On Error = yes #
Reschedule Times = 5 #
Run = «Nightly-backup level=%l since=\»%s\" storage=DDS-4" # , ,
Run Script {
Command = «echo test» #
Runs When = After # Never | Before | After | Always | AfterVSS
Runs On Failure = yes #
Runs On Client = no #
Runs On Success = yes #
}
Schedule = MonthlyCycle #
Storage = ResourceList #
Strip Prefix = string #
Type = JobType # Backup , Restore , Verify , Migrate , Admin , Copy
#Virtual Full Backup Pool = resource-name #
Where = directory #
Write Bootstrap = directory #
Write Verify List = directory #
}

Messages {
Name = Standard #
Description = «Standard messages file daemon» #
#Mail Command = # email, Mail, Mail On Error, Mail On Success
#Mail Command = "/usr/sbin/bsmtp -h mail.example.com -f \"\(Bareos\) \%r\" -s \«Bareos: \%t \%e of \%c \%l\» \%r"

##%% = %
##%c = Client's name \
##%d = Director's name \
##%e = Job Exit code (OK, Error, ...) \
##%h = Client address \
##%i = Job Id \
##%j = Unique Job name \
##%l = Job level \
##%n = Job name \
##%r = Recipients \
##%s = Since time \ #
##%t = Job type (eg Backup, ...) \
##%v = Read Volume name (Only on director side) \
##%V = Write Volume name (Only on director side) \

#Operator Command = string # Operator. Mail Command,

## message-type:
##info
##warning
##error
##fatal -
##terminate
##notsaved
##skipped ,
##mount
##restored
##all
##security info warning
##alert tape alerts
##volmgmt
##audit

#Append = [ address = ] message-type [, message-type ]* # ,
director = backup-dir = all # bareos
#Catalog = #
#Console = #
#File = # ,
#Mail = #
#Mail On Error = # email
#Mail On Success = # email
#Operator = # email
#Stderr = #
#Stdout = #
#Syslog = # Syslog
}

, . .

Source: https://habr.com/ru/post/272869/


All Articles