
Windowsのバックアップ
Baculaクライアントのインストール
ここではWindowsがクライアントのケースについてを説明します。
次のURLからWin32のdownloadを選択して、ファイルをダウンロードします。
http://sourceforge.net/project/showfiles.php?group_id=50727
exeファイルをダウンロードしたら、ファイルを起動し、Windows版のクライアントをインストールします。
途中、Remote Directorの設定入力画面が表示されるので、Directorデーモンの設定値を入力します。
クライアントのインストールが終了すると、タスクトレイにテープアイコンが表示されます。
※クライアントのInstallation TypeでCustomを選択すると、サービスとしてインストールするかを選択することができます。
サービスとしてインストールしない場合、スタート→すべてのプログラム→Bacula→Start File ServiceをクリックしてFileデーモンを起動してください。
Fileデーモンの設定
クライアントのインストールが終了したあとは、Windows版のFileデーモンの設定を行います。
Windows 版のFileデーモンの設定ファイルはC:\Documents and Settings\All Users\Application Data\Baculaにインストールされますが、スタート→すべてのプログラム→Bacula→Configuration→”Edit Client Configuration”から設定を行うことができます。
設定ファイルの書式は、Linux版のFileデーモンと同じです。
Fileデーモンの設定
FileDaemon {
Name = Windows-fd ←WindowsのFileデーモン名を指定
FDport = 9102
WorkingDirectory = "C:\\Documents and Settings\\All Users\\Application Data\\Bacula\\Work"
Pid Directory = "C:\\Documents and Settings\\All Users\\Application Data\\Bacula\\Work"
Maximum Concurrent Jobs = 2
}
Director {
Name = bacula-dir ←WindowsのFileデーモンに接続するDirector名を指定
Password = "bacula" ←WindowsのFileデーモンに接続するパスワード指定
}
Tray-Monitorは対象外なのでコメントアウトする。
#Director {
# Name = winhost-mon
# Password = "vtAYAx8kwCOW42PLwi4S7WQfPPdwB0veIlXtty8YbvFr"
# Monitor = yes
設定が終了したら、サービスから”Bacula File Service”を再起動します。
次にサーバ側のDirectorデーモンにWindowsのFileデーモンの設定を追加します。
Directorデーモンの設定
# vi /etc/bacula/bacula-dir.conf
JobDefs {
Name = "WinJob" ←任意のJobDefs名を指定
Type = Backup
Level = Incremental
Client = Windows-fd ←Windowsクライアントのbacula-fd.confで指定したFileデーモン名を指定
FileSet = "WinBackup" ←任意のFileSet名を指定
Schedule = "WeeklyCycle"
Storage = File
Messages = Standard
Pool = Default
Priority = 10
}
Job {
Name = "WinClient" ←任意のWindowsクライアントのジョブ名を指定
JobDefs = "WinJob" ←JobDefsで指定したNameの値を指定
Write Bootstrap = "/var/spool/bacula/WinClient.bsr" ←任意のBootstrapを指定
}
FileSet {
Name = "WinBackup" ←JobDefsで指定したFileSetの値を指定
Include {
Options {
signature = MD5
}
File = "C:/Documents and Settings/Administrator" ←バックアップ対象のフォルダを指定。フォルダの区切りは/(スラッシュ)で指定する
}
}
Client {
Name = Windows-fd ←JobDefsで指定したClientの値を指定
address = 192.168.0.11 ←WindowsクライアントのIPアドレスかコンピュータ名を指定
FDPort = 9102
Catalog = MyCatalog
Password = "bacula" ←Windowsクライアントのbacula-fd.confで指定したパスワードを指定
File Retention = 30 days
Job Retention = 6 months
AutoPrune = yes
}
Windowsクライアントの設定を追加したら、Directorデーモンを再起動します。
Directorデーモンの再起動
# /etc/rc.d/init.d/bacula-dir restart
バックアップ
それではWindowsクライアントのバックアップを取得してみましょう。
bconsoleの起動とバックアップの実行
# bconsole
*run
ここで先ほど追加したJob名表示されます。
A job name must be specified.
The defined Job resources are:
1: Client1
2: WinClient
3: BackupCatalog
4: RestoreFiles
Select Job resource (1-4): 2 ←WindowsのバックアップJob名(ここで2)を選択
Run Backup job
JobName: WinClient
Level: Full
Client: Windows-fd
FileSet: WinBackup
Pool: Default (From Job resource)
Storage: File (From Job resource)
When: 2008-07-21 19:32:31
Priority: 10
OK to run? (yes/mod/no): yes ←変更がなければyesを選択
Job queued. JobId=7
statusコマンドで実行結果を確認します。
ステータスの確認
*status
Status available for:
1: Director
2: Storage
3: Client
4: All
Select daemon type for status (1-4): 3
The defined Client resources are:
1: bacula-fd
2: Windows-fd
Select Client (File daemon) resource (1-2): 2 ←WindowsクライアントのFileデーモンが表示されるので選択
Connecting to Client Windows-fd at 192.168.1.11:9102
Windows-fd Version: 2.4.1 (07 July 2008) VSS Linux Cross-compile Win32
Daemon started 21-Jul-08 17:51, 2 Jobs run since started.
Heap: heap=0 smbytes=173,568 max_bytes=263,152 bufs=78 max_bufs=145
Sizeof: boffset_t=8 size_t=4 debug=0 trace=1
Running Jobs:
Director connected at: 21-Jul-08 19:35
No Jobs running.
====
Terminated Jobs:
JobId Level Files Bytes Status Finished Name
======================================================================
7 Full 151 5.351 M OK 21-Jul-08 17:52 WinClient
====
StatusがOKとなっていればバックアップは正常に行われています。
