使用Webacula操作備份還原
OS:Fedora13
Requirement:
Bacula
MySQL
php-ZendFramework php-ZendFramework-Feed php-gd php-xml
Apache
webacula
承接模組化的備份機制 - bacula一文
1. 建立Webacula使用之資料庫
mysql -u root -p
mysql> create database webacula;
mysql> grant all on webacula.* to wbuser@localhost identified by 'wbpass';
mysql> flush privileges;
mysql> quit
2. 安裝相依套件
yum install httpd php-ZendFramework php-ZendFramework-Feed php-gd php-xml
yum install webacula
3. 配置Webacula執行參數
usermod -aG bacula apache
vi /etc/webacula/config.ini
db.adapter = PDO_MYSQL
db.config.host = localhost
db.config.username = bacula資料庫擁有者的帳號
db.config.password = bacula資料庫擁有者的密碼
db.config.dbname = bacula使用之資料庫
...
def.timezone = "Asia/Taipei"
...
bacula.sudo = "/usr/bin/sudo"
bacula.bconsole = "/usr/sbin/bconsole"
bacula.bconsolecmd = "-n -c /etc/bacula/bconsole.conf"
...
db.adapter = PDO_MYSQL
db.config.host = localhost
db.config.username = webacula資料庫擁有者的帳號
db.config.password = "webacula資料庫擁有者的密碼"
db.config.dbname = webacula使用之資料庫
4. 修改bconsole背景執行權限
visudo
#Defaults requiretty
apache ALL=NOPASSWD: /usr/sbin/bconsole
5. 修改PHP參數
vi /etc/php.ini
memory_limit = 128M
max_execution_time = 600
/etc/init.d/httpd restart
6. 建立Webacula資料庫基本內容
cd /usr/share/webacula/install
./webacula_mysql_make_tables.sh mysql -u root -p
7. 配置Webacula網站存取權限
vi /etc/httpd/conf.d/webacula.conf
Deny from all
Allow from 192.168.1.0/24
Allow from localhost
Allow from ::1
...
AuthType Basic
AuthName "Webacula"
AuthUserFile /etc/httpd/conf/webacula.users
Require valid-user
/etc/init.d/httpd restart
htpasswd -c /etc/httpd/conf/webacula.users user
8. 完成,測試
http://your webacula host IP/webacula
參考文章:
http://webacula.sourceforge.net/
沒有留言:
張貼留言