CentOS 7
Ads

Bacula : Configure Bacula Server#1
2015/07/21
 
Install Integrated Backup tool, Bacula.
This example is based on the environment like follows.
+----------------------+          |          +----------------------+
| [   Bacula Server  ] |10.0.0.30 | 10.0.0.51| [   Bacula Client  ] |
|    Bacula Director   +----------+----------+    (Backup Target)   |
|    Bacula Storage    |                     |  Bacula File Daemon  |
|       Maria DB       |                     |                      |
+----------------------+                     +----------------------+

[1]
[2] Install Director and Storage daemon on Bacula Control Server.
[root@dlp ~]#
yum -y install bacula-director bacula-storage bacula-console
[3] Add Database for Bacula to MariaDB.
# change default to MariaDB

[root@dlp ~]#
alternatives --config libbaccats.so

There are 3 programs which provide 'libbaccats.so'.

  Selection    Command
-----------------------------------------------
   1           /usr/lib64/libbaccats-mysql.so
   2           /usr/lib64/libbaccats-sqlite3.so
*+ 3           /usr/lib64/libbaccats-postgresql.so

Enter to keep the current selection[+], or type selection number:
1
# add Database

[root@dlp ~]#
/usr/libexec/bacula/grant_mysql_privileges -p

Enter password:
# MariaDB root password

Privileges for user bacula granted on database bacula.
[root@dlp ~]#
/usr/libexec/bacula/create_mysql_database -p

Enter password:
# MariaDB root password

Creation of bacula database succeeded.
[root@dlp ~]#
/usr/libexec/bacula/make_mysql_tables -p

Enter password:
# MariaDB root password

Creation of Bacula MySQL tables succeeded.
[root@dlp ~]#
mysql -u root -p

Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 13
Server version: 5.5.41-MariaDB MariaDB Server

Copyright (c) 2000, 2014, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

# set Bacula user's password

MariaDB [(none)]>
set password for bacula@'%'=password('password');

Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
set password for bacula@'localhost'=password('password');

Query OK, 0 rows affected (0.00 sec)
# confirm

MariaDB [(none)]>
select user,host,password from mysql.user;

+--------+-----------+-------------------------------------------+
| user   | host      | password                                  |
+--------+-----------+-------------------------------------------+
| root   | localhost | *xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| root   | 127.0.0.1 | *xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| root   | ::1       | *xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| bacula | %         | *xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| bacula | localhost | *xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
+--------+-----------+-------------------------------------------+
5 rows in set (0.00 sec)

MariaDB [(none)]>
show databases;

+--------------------+
| Database           |
+--------------------+
| information_schema |
| bacula             |
| mysql              |
| performance_schema |
+--------------------+
4 rows in set (0.00 sec)

MariaDB [(none)]>
show tables from bacula;

+------------------+
| Tables_in_bacula |
+------------------+
| BaseFiles        |
| CDImages         |
| Client           |
| Counters         |
| Device           |
| File             |
| FileSet          |
| Filename         |
| Job              |
| JobHisto         |
| JobMedia         |
| Location         |
| LocationLog      |
| Log              |
| Media            |
| MediaType        |
| Path             |
| PathHierarchy    |
| PathVisibility   |
| Pool             |
| RestoreObject    |
| Status           |
| Storage          |
| UnsavedFiles     |
| Version          |
+------------------+
25 rows in set (0.01 sec)

MariaDB [(none)]>
exit

Bye
 
Tweet