Bareos: Plugins testen

Für die Einrichtung des MySQL-Backups in Bareos muss das Plugin-Directory auf dem Client aktiviert werden. Im Anschluss muss später die REAR-Konfiguration ebenfalls angepasst werden.

MySQL-Plugin bpipe:

Quelle: Bareos DOCS

Fileset (Platzhalter müssen ersetzt werden und pro Job ein individueller Benutzer im Fileset hinterlegt werden):

 

FileSet {
  Name = "mysql-all"
  Include {
    Plugin = "bpipe:file=/var/lib/bareos/mysql.sql:reader=mysqldump --user=<user> --password=<password> --opt --all-databases:writer=mysql --user=<user> --password=<password>"
    Options {
      signature = MD5
      compression = gzip
    }
  }
}

 

Client-Konfiguration (auf dem Client):

 

Client {
  ...
  Plugin Directory = /usr/lib64/bareos/plugins
  Plugin Names = "bpipe"
  compatible = no
}

 

Quelle: Bareos DOCS

Funktionalität des Clients kann in der BConsole überprüft werden (Es wird eine Plugin-Info ausgegeben):

 

*status client=<hostname>-fd 
Connecting to Client <hostname>-fd at 192.168.25.231:9102
 Handshake: Immediate TLS, Encryption: TLS_CHACHA20_POLY1305_SHA256

 

<hostname>-fd Version: 19.2.7 (16 April 2020) Linux-3.10.0-1062.18.1.el7.x86_64 ubuntu Ubuntu 18.04.4 LTS
Daemon started 13-Dec-20 16:26. Jobs: run=0 running=0, bareos.org build binary
 Sizeof: boffset_t=8 size_t=8 debug=0 trace=0 bwlimit=0kB/s
Plugin Info:
 Plugin : bpipe-fd.so
 Description: Bareos Pipe File Daemon Plugin
 Version : 2, Date: January 2014
 Author : Kern Sibbald
 License : Bareos AGPLv3
 Usage : bpipe:file=<filepath>:reader=<readprogram>:writer=<writeprogram> readprogram runs on backup and its stdout is saved writeprogram runs on restore and gets restored data into stdin the data is internally stored as filepath (e.g. mybackup/backup1)

Running Jobs:
bareos-dir (director) connected at: 13-Dec-20 16:26
No Jobs running.
====

 

Alle Plugins auf dem Client einschalten:

/etc/bareos/bareos-fd.d/client/myself.conf

 

Client {
Name = <hostname>-fd
Maximum Concurrent Jobs = 20
# remove comment from "Plugin Directory" to load plugins from specified directory.
# if "Plugin Names" is defined, only the specified plugins will be loaded,
# otherwise all filedaemon plugins (*-fd.so) from the "Plugin Directory".
#
Plugin Directory = "/usr/lib/bareos/plugins"
# Plugin Names = ""

# if compatible is set to yes, we are compatible with bacula
# if set to no, new bareos features are enabled which is the default
# compatible = yes
}