Modified: 30 December 2008
Created: 21 December 2008
ブラウザから状態を確認する (21 December 2008)
他のサーバーのデータをバックアップする (30 December 2008)
他のWindowsサーバーのデータをバックアップする (30 December 2008)
"bacula-sd"の起動でエラーが出る (21 December 2008)
ファイルサーバーやストレージサーバーへの接続を確認する方法 (31 December 2008)
自動起動させる方法 (30 December 2008)
以下のように、statusコマンドを実行すれば確認できます。
# bconsole
*status file
*status storage
*status dir
以下を実行すると、サーバー起動時に自動的に起動させることができます。
ビルドしたディレクトリに移動して、以下を実行します。
# cd ./bacula-2.4.3
# make install-autostart
#
GUIのアプリがあり、以下からダウンロードできます。
http://sourceforge.net/project/showfiles.php?group_id=50727&package_id=44845
"bacula-gui"のTARファイルをダウンロードして、解凍します。
解凍後、"bacula-web" を、"/var/www/html" に移動します。
PHP のPear をインストールします。
# yum install php-pear-DB 以下を開きます。
https://bacula.tomo.ac/bacula-web/test.php 上記で、必要なパッケージのチェックが行われ、以下のように、YES が3つ出ればOKです。
上記、Test をクリックして動作を確認します。以下のように表示されればOKです。
設定ファイル("./configs/bacula.conf")を開き、データベースの設定をします。
:
# DATABASE INFORMATION AND MULTICATALOG SUPPORT
# ---------------------------------------------
# This section contains the database configuration.
# You must create a user or to give it permissions to access
# from web machine.
[.DATABASE]
# Your database host or IP
host = localhost
# Your database login
login = bacula
# Your database password.
# For empty passwords use this:
# pass =
pass =
# Your database name
db_name = bacula
# Your database type: mysql,sqlite,pgsql
db_type = pgsql
# Uncomment this and modify it if your database runs on a non standard port.
db_port = 5432
:データベースへの接続が成功すると、以下の画面が出ます。
ファイルサーバー側の設定
ファイルサーバー(バックアップするデータを保持しているサーバー)側(192.168.0.90)の、"bacula-fd.conf"は、以下のように設定します。
ディレクタサーバーが接続するための条件を指定するだけで、具体的なディレクトリの位置などは指定しません。"Name"や"Password"は、デイレクタサーバーにあわせます。
#
# Default Bacula File Daemon Configuration file
#
# For Bacula release 2.2.8 (26 January 2008) -- redhat
#
# There is not much to change here except perhaps the
# File daemon Name to
#
#
# List Directors who are permitted to contact this File daemon
#
Director {
Name = bacula-dir
Password = "bacula"
}
#
# Restricted Director, used by tray-monitor to get the
# status of the file daemon
#
Director {
Name = bacula-mon
Password = "bacula"
Monitor = yes
}
#
# "Global" File daemon configuration specifications
#
FileDaemon {
Name = bacula-fd
FDport = 9102
WorkingDirectory = /var/spool/bacula
Pid Directory = /var/run
Maximum Concurrent Jobs = 20
}
# Send all messages except skipped files back to Director
Messages {
Name = Standard
director = bacula-dir = all, !skipped, !restored
}ファイルサーバーのサービスを起動します。
# service bacula-fd start
ディレクタサーバー側の設定
バックアップするデータのあるサーバー(File Service)のIPアドレスは、ディレクタサーバー(192.168.0.106)の"bacula-dir.conf"内の、"Client"の"Address"で指定します。
:
JobDefs {
Name = "DefaultJob"
Type = Backup
Level = Incremental
Client = bacula-fd
FileSet = "Full Set"
Storage = File
Messages = Standard
Pool = Default
Priority = 10
}
:
# List of files to be backed up
FileSet {
Name = "Full Set"
Include {
Options {
signature = MD5
}
# -- Source Directory -- #
File = /backup/test
}
}
# Client (File Services) to backup
Client {
Name = bacula-fd
Address = 192.168.0.90
FDPort = 9102
Catalog = MyCatalog
Password = "bacula"
File Retention = 30 days
Job Retention = 6 months
AutoPrune = yes
}
:
ファイルサーバー側の設定
"Name"や"Password"は、デイレクタサーバーにあわせます。
#
# Default Bacula File Daemon Configuration file
#
# For Bacula release 2.4.3 (10/10/08) -- Windows MVS
#
# There is not much to change here except perhaps the
# File daemon Name
#
#
# "Global" File daemon configuration specifications
#
FileDaemon {
Name = bacula-fd
FDport = 9102
WorkingDirectory = "C:\\backup\\temp"
Pid Directory = "C:\\backup\\temp"
Maximum Concurrent Jobs = 2
}
#
# List Directors who are permitted to contact this File daemon
#
Director {
Name = bacula-dir
Password = "bacula"
}
#
# Restricted Director, used by tray-monitor to get the
# status of the file daemon
#
Director {
Name = bacula-mon
Password = "bacula"
Monitor = yes
}
# Send all messages except skipped files back to Director
Messages {
Name = Standard
director = bacula-dir = all, !skipped, !restored
}
ディレクタサーバー側の設定
:
JobDefs {
Name = "DefaultJob"
Type = Backup
Level = Incremental
Client = bacula-fd
FileSet = "Full Set"
Storage = File
Messages = Standard
Pool = Default
Priority = 10
}
:
# List of files to be backed up
FileSet {
Name = "Full Set"
Include {
Options {
signature = MD5
}
# -- Source Directory -- #
File = C:/backup/test
}
}
:
# Client (File Services) to backup
Client {
Name = bacula-fd
Address = 192.168.0.90
FDPort = 9102
Catalog = MyCatalog
Password = "bacula"
File Retention = 30 days
Job Retention = 6 months
AutoPrune = yes
}
:サービスは、「Start File Service」を起動すると、タスクトレイにアイコンができますので、それでOKです。
起動すると以下のエラーが出ます。しかし、動作はしているようです。
# service bacula-sd start
Starting bacula-sd: 21-12月 10:15 bacula-sd JobId 0: Error: stored.c:314 No Messages resource defined in /etc/bacula/bacula-sd.conf. Cannot continue.
[ OK ]
#
回避方法がわかる方教えてください!