2021年11月8日 星期一

Bacula 11.0.5 install with rpm

Reference:
 
步驟:
  • Deb and rpm Packages 申請 rpm 下載,會收到 email 通知下載連結
    • access key (紅色部分) 複製下來
  • 安裝 CentOS 7.x (最小安裝即可)
  • yum install wget -y
  • wget https://www.bacula.org/downloads/Bacula-4096-Distribution-Verification-key.asc --no-check-certificate
  • rpm --import Bacula-4096-Distribution-Verification-key.asc
  • vi /etc/yum.repos.d/Bacula.repo
    • [Bacula-Community]
      name=CentOS - Bacula - Community
      baseurl=http://www.bacula.org/packages/[access key]/rpms/11.0.5/el7/
      enabled=1
      protect=0
      gpgcheck=1
  • yum install mariadb-server -y
    • systemctl start mariadb.service
      systemctl enable mariadb.service
  • yum install bacula-mysql -y
  • /opt/bacula/scripts/create_mysql_database -u root
  • /opt/bacula/scripts/grant_mysql_privileges -u root
  • /opt/bacula/scripts/make_mysql_tables -u root
  • mysql_secure_installation
    • 預設密碼是空的
  • mysql -u root -p
    • UPDATE mysql.user SET password=PASSWORD("password") WHERE user='bacula';
      FLUSH PRIVILEGES;
      exit
  • 調整 link for webmin (web manager), baculum (web report)
    • ln -s /opt/bacula/etc/ /etc/bacula
      ln -s /opt/bacula/bin/bacula-dir /usr/sbin/bacula-dir
      ln -s /opt/bacula/bin/bacula-sd /usr/sbin/bacula-sd
      ln -s /opt/bacula/bin/bconsole /usr/sbin/bconsole
      ln -s /opt/bacula/bin/bacula-fd /usr/sbin/bacula-fd
      ln -s /opt/bacula/bin/bdirjson /usr/sbin/bdirjson
      ln -s /opt/bacula/bin/bsdjson /usr/sbin/bsdjson
      ln -s /opt/bacula/bin/bfdjson /usr/sbin/bfdjson
      ln -s /opt/bacula/bin/bbconsjson /usr/sbin/bbconsjson
  • 設定log目錄
    • mkdir /opt/bacula/log
      chown bacula:bacula /opt/bacula/log
  • Configure Bacula Director
    • vi /etc/bacula/bacula-dir.conf
      • 修改dbpassword
    • /opt/bacula/bin/bacula-dir -tc /etc/bacula/bacula-dir.conf
  • Configure Bacula Storage
    • mkdir /home/backup
    • chown bacula:bacula /home/backup
    • vi /etc/bacula/bacula-sd.conf
      • 修改Archive Device = /home/backup
    • /opt/bacula/bin/bacula-sd -tc /etc/bacula/bacula-sd.conf
  • Configure Bacula Console
    • vi /etc/bacula/bconsole.conf
      • 暫不需修改
    • /opt/bacula/bin/bconsole -tc /etc/bacula/bconsole.conf
  • Configure Bacula file daemon
    • vi /etc/bacula/bacula-fd.conf
      • 暫不需修改
    • /opt/bacula/bin/bacula-fd -tc /etc/bacula/bacula-fd.conf
  • 啟動 bacula service
    • systemctl start bacula-fd.service
      systemctl start bacula-sd.service
      systemctl start bacula-dir.service
      systemctl enable bacula-fd.service
      systemctl enable bacula-sd.service
      systemctl enable bacula-dir.service
  • 安裝webmin (https://sourceforge.net/projects/webadmin/files/webmin/)
    • wget https://sourceforge.net/projects/webadmin/files/webmin/1.981/webmin-1.981-1.noarch.rpm --no-check-certificate
    • yum install webmin-1.981-1.noarch.rpm -y
    • service webmin status
    • chkconfig webmin on
  • 修改 firewalld
    • firewall-cmd --zone=public --add-port=10000/tcp --permanent
      firewall-cmd --reload
  • 連線到 webmin 調整設定
    • https://<Your IP>:10000
    • Un-used Modules / Bacula Backup System
      • Click on “ Module Configuration” link
      • Select the database type and fill the bacula database user and password
      • 重整網頁,下次可以從 System / Bacula Backup System 進入操作
  • 先做 Label Volume 就可以開始測試 backup 了
  • web report 請見另一篇 baculum
2021/11/10 update:
  •  使用webmin修改storage devices後,需要執行systemctl restart bacula-sd讓修改的部分生效。

  •  webmin 1.981和bacula 11.0.5有整合問題,這些功能須改用baculum
    • 從webmin無法執行run backup job
    • 從webminrestore無法選檔案

沒有留言:

張貼留言