bacula 备份mysql_bacula备份方案
一、系统准备
1、系统环境
[root@template tools]# cat /etc/redhat-release
Fedora release 25 (Twenty Five)
2、关闭selinux
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
setenforce 0
3、关闭Centos7.1的防火墙
#停止firewall和禁止firewall开机启动
systemctl stop firewalld.service
systemctl disable firewalld.service
二、安装mariadb数据库
1、安装mysql
[root@template tools]# yuminstall mysql mysql-server mysql-devel -y
[root@template tools]# systemctl start mariadb
[root@template tools]# systemctl enable mariadb
Created symlink /etc/systemd/system/multi-user.target.wants/mariadb.service → /usr/lib/systemd/system/mariadb.service.
[root@template tools]# netstat -lntp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 853/sshd
tcp6 0 0 :::9090 :::* LISTEN 1/systemd
tcp6 0 0 :::3306 :::* LISTEN 6355/mysqld
tcp6 0 0 :::22 :::* LISTEN 853/sshd
[root@template tools]# mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 10.1.26-MariaDB MariaDB Server
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> exit
Bye
2、安装bacula软件
yum install bacula* -y
启动服务
[root@template bacula]# systemctl start bacula-dir
[root@template bacula]# systemctl start bacula-fd
[root@template bacula]# systemctl start bacula-sd
3、进入bacula数据库文件存放目录
[root@template bacula]# cd /usr/libexec/bacula/
[root@template bacula]# ll
total 216
-rwxr-xr-x. 1 root root 4750 Mar 16 2017 bacula_config
-rw-r--r--. 1 root root 1238 Mar 16 2017 btraceback.dbx
-rw-r--r--. 1 root root 367 Mar 16 2017 btraceback.gdb
-rw-r--r--. 1 root root 433 Mar 16 2017 btraceback.mdb
-rwxr-xr-x. 1 root root 948 Mar 16 2017 create_bacula_database
-rwxr-xr-x. 1 root root 379 Mar 16 2017 create_mysql_database
-rwxr-xr-x. 1 root root 1748 Mar 16 2017 create_postgresql_database
-rwxr-xr-x. 1 root root 277 Mar 16 2017 create_sqlite3_database
-rwxr-xr-x. 1 root root 598 Mar 16 2017 delete_catalog_backup
-rwxr-xr-x. 1 root root 10589 Mar 16 2017 disk-changer
-rwxr-xr-x. 1 root root 782 Mar 16 2017 drop_bacula_database
-rwxr-xr-x. 1 root root 951 Mar 16 2017 drop_bacula_tables
-rwxr-xr-x. 1 root root 383 Mar 16 2017 drop_mysql_database
-rwxr-xr-x. 1 root root 1297 Mar 16 2017 drop_mysql_tables
-rwxr-xr-x. 1 root root 321 Mar 16 2017 drop_postgresql_database
-rwxr-xr-x. 1 root root 969 Mar 16 2017 drop_postgresql_tables
-rwxr-xr-x. 1 root root 234 Mar 16 2017 drop_sqlite3_database
-rwxr-xr-x. 1 root root 242 Mar 16 2017 drop_sqlite3_tables
-rwxr-xr-x. 1 root root 17599 Mar 16 2017 dvd-handler
-rwxr-xr-x. 1 root root 989 Mar 16 2017 grant_bacula_privileges
-rwxr-xr-x. 1 root root 996 Mar 16 2017 grant_mysql_privileges
-rwxr-xr-x. 1 root root 2814 Mar 16 2017 grant_postgresql_privileges
-rwxr-xr-x. 1 root root 198 Mar 16 2017 grant_sqlite3_privileges
-rwxr-xr-x. 1 root root 959 Mar 16 2017 make_bacula_tables
-rwxr-xr-x. 1 root root 4162 Mar 16 2017 make_catalog_backup.pl
-rwxr-xr-x. 1 root root 14882 Mar 16 2017 make_mysql_tables
-rwxr-xr-x. 1 root root 15506 Mar 16 2017 make_postgresql_tables
-rwxr-xr-x. 1 root root 14550 Mar 16 2017 make_sqlite3_tables
-rwxr-xr-x. 1 root root 10479 Mar 16 2017 mtx-changer
-rwxr-xr-x. 1 root root 2323 Mar 16 2017 mtx-changer.conf
-rwxr-xr-x. 1 root root 964 Mar 16 2017 update_bacula_tables
-rwxr-xr-x. 1 root root 3948 Mar 16 2017 update_mysql_tables
-rwxr-xr-x. 1 root root 3970 Mar 16 2017 update_postgresql_tables
-rwxr-xr-x. 1 root root 5659 Mar 16 2017 update_sqlite3_tables
#导入数据库文件
./create_mysql_database
./grant_mysql_privileges
./make_mysql_tables
#检查数据库
[root@template ~]# mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 10.1.26-MariaDB MariaDB Server
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| bacula |
| information_schema |
| mysql |
| performance_schema |
| test |
+--------------------+
5 rows in set (0.00 sec)
MariaDB [(none)]> use bacula
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
MariaDB [bacula]> show tables;
+------------------+
| Tables_in_bacula |
+------------------+
| BaseFiles |
| CDImages |
| Client |
| Counters |
| Device |
| File |
| FileSet |
| Filename |
| Job |
| JobHisto |
| JobMedia |
| Location |
| LocationLog |
| Log |
| Media |
| MediaType |
| Path |
| PathHierarchy |
| PathVisibility |
| Pool |
| RestoreObject |
| Snapshot |
| Status |
| Storage |
| UnsavedFiles |
| Version |
+------------------+
26 rows in set (0.00 sec)
#检查授权
MariaDB [bacula]> use mysql
MariaDB [mysql]> select user,host from mysql.user;
+--------+--------------+
| user | host |
+--------+--------------+
| bacula | % |
| root | 127.0.0.1 |
| root | ::1 |
| | localhost |
| root | localhost |
| | template.com |
| root | template.com |
+--------+--------------+
7 rows in set (0.00 sec)
#重启服务
[root@template bacula]# systemctl restart bacula-dir
[root@template bacula]# systemctl restart bacula-fd
[root@template bacula]# systemctl restart bacula-sd
#检查
[root@template bacula]# netstat -lntup
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:9102 0.0.0.0:* LISTEN 8358/bacula-fd
tcp 0 0 0.0.0.0:9103 0.0.0.0:* LISTEN 8363/bacula-sd
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 853/sshd
tcp6 0 0 :::9090 :::* LISTEN 1/systemd
tcp6 0 0 :::3306 :::* LISTEN 6355/mysqld
tcp6 0 0 :::22 :::* LISTEN 853/sshd
udp 0 0 0.0.0.0:31634 0.0.0.0:* 928/dhclient
udp 0 0 0.0.0.0:68 0.0.0.0:* 928/dhclient
udp 0 0 127.0.0.1:323 0.0.0.0:* 746/chronyd
udp6 0 0 :::30510 :::* 928/dhclient
udp6 0 0 ::1:323 :::* 746/chronyd
#配置文件存放目录
[root@comput4 ~]# cd /etc/bacula/
[root@comput4 bacula]# ll
total 64
-rw-r-----. 1 root bacula 6190 Nov 24 14:11 bacula-dir.conf
-rw-r-----. 1 root root 1020 Nov 24 10:37 bacula-fd.conf
-rw-r-----. 1 root root 6779 Nov 24 14:17 bacula-sd.conf
-rw-r-----. 1 root root 163 Mar 16 2017 bat.conf
-rw-r-----. 1 root root 253 Nov 24 10:36 bconsole.conf
-rw-r-----. 1 root bacula 312 Mar 16 2017 query.sql
-rw-r-----. 1 root root 543 Mar 16 2017 tray-monitor.conf
#安装bacula-fd
apt install bacula-fd -y
systemctl start bacula-fd
systemctl enable bacula-fd
vi /etc/bacula/bacula-fd.conf
4、安装webmin管理bacula
#软件下载:http://www.webmin.com/download.html
[root@template tools]# ll
total 56456
-rw-r--r--. 1 root root 28843041 Nov 24 10:18 webmin-1.860-1.noarch.rpm
-rw-r--r--. 1 root root 28963356 Nov 24 10:19 webmin-1.860-1.src.rpm
#先安装依赖包
yum -y install perl perl-Net-SSLeay openssl perl-IO-Tty perl-Encode-Detect
#安装webmin
[root@template tools]# rpm -ivh webmin-1.860-1.src.rpm
warning: webmin-1.860-1.src.rpm: Header V3 DSA/SHA1 Signature, key ID 11f63c51: NOKEY
Updating / installing...
1:webmin-1.860-1 ################################# [100%]
[root@template tools]# rpm -ivh webmin-1.860-1.noarch.rpm
warning: webmin-1.860-1.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID 11f63c51: NOKEY
Preparing... ################################# [100%]
Operating system is Fedora Linux
Updating / installing...
1:webmin-1.860-1 ################################# [100%]
Webmin install complete. You can now login to https://template.com:10000/
as root with your root password.
#打开IE浏览器,输入https://IP:10000 ,用户名为root,口令即是LINUX系统用户口令
#选择mysql
点保存。
6.安装Bacula-Web图形界面(php环境请自行安装)
#tar zxvf bacula-web-5.2.12.tgz -C /data/wwwroot/www.webacula.com/
#cd /data/wwwroot/www.webacula.com/application/config/
#cp config.php.sample config.php
#vim config.php
参照一下代码修改
// MySQL bacula catalog
$config[0]['label'] = 'Backup Server';
$config[0]['host'] = 'localhost';
$config[0]['login'] = 'bacula';
$config[0]['password'] = '123456';
$config[0]['db_name'] = 'bacula';
$config[0]['db_type'] = 'mysql';
$config[0]['db_port'] = '3306';
#chown www -R /data/wwwroot/www.webacula.com/application/view/cache
#service nginx restart
#service php-fpm restart
bacula 备份mysql_bacula备份方案相关推荐
- 混合云存储开启企业上云新路径--阿里云混合云备份容灾方案发布
摘要:当前,数据已经成为了企业的核心资产.而如果数据中心发生故障不仅会给企业带来巨大损失,甚至会直接迫使企业走向倒闭.对于企业而言,每一字节业务数据的丢失都是一场重大的灾难!那么,如何保证企业的核心数 ...
- 混合云存储开启企业上云新路径--阿里云混合云备份容灾方案发布 1
摘要: 当前,数据已经成为了企业的核心资产.而如果数据中心发生故障不仅会给企业带来巨大损失,甚至会直接迫使企业走向倒闭.对于企业而言,每一字节业务数据的丢失都是一场重大的灾难!那么,如何保证企业的核心 ...
- 【es】elasticsearch生产数据备份和恢复方案
一.前言概要 生产环境中运行的组件,只要有数据存储,定时备份.灾难恢复是必修课,MySQL数据库的备份方案已经非常成熟,elasticsearch也同样有成熟的数据备份.恢复方案,我们来了解一下. 本 ...
- commvault备份mysql数据库_CommVault备份项目实施方案.docx
仅供XXXX和CommVault所有 XXXX CommVault集中备份项目实施方案 CommVault 中国咨询服务部 TIME \@ "yyyy年M月" 2017年10月 版 ...
- commvault备份mysql数据库_2-CommVault备份项目实施方案-XXXX.docx
仅供XXXX和CommVault所有 XXXX CommVault集中备份项目实施方案 CommVault 中国咨询服务部 TIME \@ "yyyy年M月" 2019年3月 版本 ...
- his系统服务器安全方案,HIS网络安全和防范措施、备份及应急方案
HIS网络安全和防范措施.备份及应急方案 在医院的HIS网络系统正式运行之后, 系统整体运行的稳定性,安全性和应急能力就显得越来越重要, 随着使用时间的增长, 在服务器中储存了大量的历史数据, 而这些 ...
- MySQL备份系列--备份方案总结性梳理
mysql数据库备份有多么重要已不需过多赘述了,废话不多说!以下总结了mysql数据库的几种备份方案: 一.binlog二进制日志通常作为备份的重要资源,所以再说备份方案之前先总结一下binlog日志 ...
- Green Plum 备份恢复集成方案
Green Plum 备份恢复集成方案 前置条件 安装了gpbackup和gprestore备份恢复工具 不同的gpbackup会生成不同的时间戳,gprestore 必须通过–timestamp选项 ...
- 系统备份软件测试,备份软件测试方案
<备份软件测试方案>由会员分享,可在线阅读,更多相关<备份软件测试方案(17页珍藏版)>请在人人文库网上搜索. 1.备份一体机测试方案目录目录2第一章:测试环境配置31.1测试 ...
最新文章
- 浅谈强化学习的方法及学习路线
- Spring3:AOP
- TIOBE 11月编程语言排行:Java首次跌出前二,Python 势不可挡。
- zedboard--zynq使用自带外设IP让ARM PS访问FPGA(八) 转载
- SVG与CSS的特殊性
- AutoIt: send 命令 VS ControlClick的使用
- flutter text 自动换行_Flutter 系列博客——05 StatelessWidget vs StatefulWidget
- mysql如何只查询表中的前几条数据?多表查询前提了解
- 手写数字数据集——MINST的读取及预处理
- 每日一记:windows 2008 r2安装单实例oracle 11.2.0.1.0 - 64bit监听和EM服务异常处理
- 持久化内存+傲腾持久化内存
- java list 冒泡_JAVA List 排序 冒泡排序
- Ubuntu 快捷截图
- 开关电源—Buck电路原理及其仿真
- 那些有趣的网站系列(六)
- java 生成der_java – 我们如何将字符串从PEM转换为DER格式
- WebGL-Shader入门(3.着色器语言的限定词-参数限定词/存储限定词/精度限定词)
- 对比“码绘”与“手绘”的区别
- MAC下用F9-F12模拟PageUP/PageDown/HOME/END
- LOESS 局部加权回归介绍