Bacula : コンポーネントの設定2023/08/09 |
Bacula 関連コンポーネントを設定します。
|
|
[1] | Bacula Director の設定です。 |
root@dlp:~#
vi /etc/bacula/bacula-dir.conf Director { # define myself Name = dlp.srv.world-dir DIRport = 9101 # where we listen for UA connections QueryFile = "/etc/bacula/scripts/query.sql" WorkingDirectory = "/var/lib/bacula" PidDirectory = "/run/bacula" Maximum Concurrent Jobs = 20 # 25行目 : コンソール接続パスワードを設定 Password = "password" # Console password Messages = Daemon # リスンするアドレス定 DirAddress = 0.0.0.0 } ..... ..... Job { Name = "RestoreFiles" Type = Restore Client=dlp.srv.world-fd Storage = File1 # The FileSet and Pool directives are not used by Restore Jobs # but must not be removed FileSet="Full Set" Pool = File Messages = Standard # 101行目 : リストア先のディレクトリを指定 Where = /tmp ..... ..... # 126行目 : バックアップ対象のディレクトリを指定 File = /etc } ..... ..... FileSet { Name = "Catalog" Include { Options { signature = MD5 } # 168行目 : 変更 File = "/var/lib/bacula/bacula.sql" ..... ..... Client { Name = dlp.srv.world-fd Address = localhost FDPort = 9102 Catalog = MyCatalog # 178行目 : File デーモン接続パスワードを設定 Password = "password" # password for FileDaemon File Retention = 60 days # 60 days Job Retention = 6 months # six months AutoPrune = yes # Prune expired Jobs/Files } ..... ..... Autochanger { Name = File1 # Do not use "localhost" here # 204行目 : 注釈の通り、[localhost] ではなく自ホストの FQDN に変更 Address = dlp.srv.world # N.B. Use a fully qualified name here SDPort = 9103 # 206行目 : Storage デーモン接続パスワードを設定 Password = "password" Device = FileChgr1 Media Type = File1 Maximum Concurrent Jobs = 10 # run up to 10 jobs a the same time Autochanger = File1 # point to ourself } ..... ..... Catalog { Name = MyCatalog # 243行目 : DB 接続情報 dbname = "bacula"; dbuser = "bacula"; dbpassword = "password" } ..... ..... Pool { Name = File Pool Type = Backup Recycle = yes # Bacula can automatically recycle Volumes AutoPrune = yes # Prune expired volumes # 304行目 : ボリューム保持期間 Volume Retention = 365 days # one year # ボリュームの最大容量 Maximum Volume Bytes = 50G # Limit Volume size to something reasonable # ボリュームの最大数 Maximum Volumes = 100 # Limit number of Volumes in Pool # ボリュームに付加する接頭辞 Label Format = "Vol-" # Auto label } ..... ..... # 322行目 : tray-monitor 接続パスワード Console { Name = dlp.srv.world-mon Password = "password" CommandACL = status, .status }
root@dlp:~#
vi /etc/bacula/bconsole.conf Director { Name = dlp.srv.world-dir DIRport = 9101 address = localhost # Director に設定したコンソール接続パスワード Password = "password" } ~root@dlp:~# systemctl restart bacula-dir |
[2] | Bacula Storage の設定です。 |
root@dlp:~#
vi /etc/bacula/bacula-sd.conf Storage { # definition of myself Name = dlp.srv.world-sd SDPort = 9103 # Director's port WorkingDirectory = "/var/lib/bacula" Pid Directory = "/run/bacula" Plugin Directory = "/usr/lib/bacula" Maximum Concurrent Jobs = 20 # 24行目 : リスンする範囲 SDAddress = 0.0.0.0 ..... ..... Director { Name = dlp.srv.world-dir # 32行目 : Storage デーモン接続パスワード Password = "password" } ..... ..... # 41行目 : tray-monitor 接続パスワード Director { Name = dlp.srv.world-mon Password = "password" Monitor = yes } # バックアップ取得先のディレクトリを変更 (下例は [/tmp]) root@dlp:~# sed -i -e "s/\/nonexistant\/path\/to\/file\/archive\/dir/\/tmp/g" /etc/bacula/bacula-sd.conf systemctl restart bacula-sd |
[3] | Bacula File の設定です。 |
root@dlp:~#
vi /etc/bacula/bacula-fd.conf Director { Name = dlp.srv.world-dir # 19行目 : File デーモン接続パスワード Password = "password" } ..... ..... # 28行目 : tray-monitor 接続パスワード Director { Name = bacula-mon Password = "password" Monitor = yes } FileDaemon { # this is me Name = dlp.srv.world-fd FDport = 9102 # where we listen for the director WorkingDirectory = /var/lib/bacula Pid Directory = /run/bacula Maximum Concurrent Jobs = 20 Plugin Directory = /usr/lib/bacula # 42行目 : リスンする範囲 FDAddress = 0.0.0.0root@dlp:~# systemctl restart bacula-fd |
Sponsored Link |
|