CentOS 7
Sponsored Link

Bacula : 管理サーバー設定#12015/07/21

 
マルチプラットフォーム、マルチクライアントをサポートする統合バックアップツール Bacula をインストールします。
例として、ここでは以下のような環境で構築します。
+----------------------+          |          +----------------------+
| [   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] Bacula 管理サーバーに Director と Storage コンポーネントをインストールします。
[root@dlp ~]#
yum -y install bacula-director bacula-storage bacula-console
[3] Bacula 用のデータベースを MariaDB に登録します。
# 参照するライブラリを 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
# データベース登録

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

Enter password:    
# MariaDB root パスワード

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

Enter password:    
# MariaDB root パスワード

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

Enter password:    
# MariaDB root パスワード

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.

# Baculaユーザーのパスワード設定

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)
# 確認

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
関連コンテンツ