summaryrefslogtreecommitdiff
path: root/quickstart_mysql.txt
blob: e9233573433900982922a154a3074d9a91c028fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
======== Quick installation guide with the MySQL backend ========

Perform the following commands to install Bacula with its default configuration
and all daemons and consoles in one server.

1) Install packages

# yum -y install mysql-server \
    bacula-director bacula-storage bacula-client \
    bacula-console bacula-console-bat

2) Select the MySQL database backend

# alternatives --set libbaccats.so /usr/lib64/libbaccats-mysql.so

3) Create database

# systemctl enable mysqld.service
# systemctl start mysqld.service

# cd /usr/libexec/bacula
# ./create_bacula_database mysql
# ./make_bacula_tables mysql
# ./grant_bacula_privileges mysql

4) Change passwords in /etc/bacula/*.conf with something you like.

# sed -i -e 's/@@DIR_PASSWORD@@/dir-password/g' \
        -e 's/@@FD_PASSWORD@@/fd-password/g' \
        -e 's/@@SD_PASSWORD@@/sd-password/g' \
        -e 's/@@MON_DIR_PASSWORD@@/mon-dir-password/g' \
        -e 's/@@MON_FD_PASSWORD@@/mon-fd-password/g' \
        -e 's/@@MON_SD_PASSWORD@@/mon-sd-password/g' \
        /etc/bacula/*.conf

5) Enable daemons and check they are working

# systemctl enable bacula-dir.service
# systemctl enable bacula-sd.service
# systemctl enable bacula-fd.service

# systemctl start bacula-dir.service
# echo status dir=bacula-dir | bconsole

# systemctl start bacula-sd.service
# echo status storage=bacula-sd | bconsole

# systemctl start bacula-fd.service
# echo status client=bacula-fd | bconsole

6) To grant console access to regular users add the read permission to the
console configuration files. Remember that there is no authentication check; so
a user that can launch the console can perform any command.

# chmod +r /etc/bacula/bconsole.conf /etc/bacula/bat.conf