0

What plugin I should use for that?

Can you show me your config from bareos-fd.conf and FileSet section from bareos-dir.conf

Thank you!

Paul Andrew
  • 3,233
  • 2
  • 17
  • 37
Zhag
  • 133
  • 2
  • 7

2 Answers2

1

bareos-dir.conf

FileSet {
  Name = "mx-zag-mysql"
  Include {
    Plugin = "bpipe:file=/MYSQL/dump.sql:reader=mysqldump -uUser -pPassword --single-transaction --add-drop-database -B DB_name:writer=mysql -uUser -pPassword"
      Options {
        Signature = MD5 # calculate md5 checksum per file
        compression = GZIP
      }
  }
}

bareos-fd.conf

FileDaemon {                          # definition of myself
  Name = mx-zag-fd
  Maximum Concurrent Jobs = 20

  Plugin Directory = /usr/lib/bareos/plugins
  Plugin Names = "bpipe"
}
Zhag
  • 133
  • 2
  • 7
  • And you need create directory MYSQL ownered by bareos user and group with drwxrwxr-x rights. – Zhag Sep 13 '16 at 11:09
1

It depends, if it's just a small DB, the bpipe plugin is probably the easiest to get started. There's also the Bareos mysql-python plugin, which is more flexible than bpipe, but like bpipe it makes use of mysqldump. So both of them only do full backups. The third option is the newer Bareos MySQL / MariaDB Percona xtrabackup Plugin, which can also do incremental backups of InnoDB tables.

All Bareos plugins for backing up MySQL/MariaDB are documented at http://doc.bareos.org/master/html/bareos-manual-main-reference.html#BackupOfAMySQLDatabase