Add repo:
vim /etc/yum.repos.d/alexlinux.repo
[general] name=alexlinux - general baseurl=http://rpm.alexlinux.com/general/x86_64/ gpgcheck=0
Install bacula 7:
yum clean all yum install bacula-director bacula-storage bacula-client bacula-console
Specify MySQL as database:
[root@alexlinux ~]# alternatives --config libbaccats.so
There are 3 programs which provide ‘libbaccats.so’.
Selection Command
———————————————–
1 /usr/lib64/libbaccats-mysql.so
2 /usr/lib64/libbaccats-sqlite3.so
*+ 3 /usr/lib64/libbaccats-postgresql.so
Enter to keep the current selection[+], or type selection number: 1
Install and start MySQL:
# yum install mariadb-server # systemctl enable mariadb # systemctl start mariadb # /usr/libexec/bacula/grant_mysql_privileges -u root # /usr/libexec/bacula/create_mysql_database -u root Creation of bacula database succeeded. # /usr/libexec/bacula/make_mysql_tables -u root Creation of Bacula MySQL tables succeeded. # mysql -u root
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 6
Server version: 5.5.41-MariaDB MariaDB Server
Copyright (c) 2000, 2014, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> UPDATE mysql . user SET password=PASSWORD("BACULAPASSWD") WHERE user='bacula';
Query OK, 2 rows affected (0.00 sec)
Rows matched: 2 Changed: 2 Warnings: 0
MariaDB [(none)]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> quit
Enter password for database:
vim /etc/bacula/bacula-dir.conf Catalog { Name = MyCatalog dbname = "bacula"; dbuser = "bacula"; dbpassword = "BACULAPASSWD" }
start bacula services:
# systemctl enable bacula-dir # systemctl enable bacula-fd # systemctl enable bacula-sd # systemctl start bacula-dir # systemctl start bacula-fd # systemctl start bacula-sd
Check that bacula is running:
[root@alexlinux ~]# netstat -tnap | grep bacula tcp 0 0 0.0.0.0:9101 0.0.0.0:* LISTEN 2479/bacula-dir tcp 0 0 0.0.0.0:9102 0.0.0.0:* LISTEN 2373/bacula-fd tcp 0 0 0.0.0.0:9103 0.0.0.0:* LISTEN 2379/bacula-sd
Start default bacula job:
[root@alexlinux ~]# bconsole
Connecting to Director localhost:9101
1000 OK: 1 bacula-dir Version: 7.0.5 (28 July 2014)
Enter a period to cancel a command.
*run
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
A job name must be specified.
The defined Job resources are:
1: BackupClient1
2: BackupCatalog
3: RestoreFiles
Select Job resource (1-3): 1
Run Backup job
JobName: BackupClient1
Level: Incremental
Client: bacula-fd
FileSet: Full Set
Pool: File (From Job resource)
Storage: File1 (From Job resource)
When: 2015-07-28 20:49:06
Priority: 10
OK to run? (yes/mod/no): yes
Job queued. JobId=1
You have messages.
*messages
28-Jul 20:49 bacula-dir JobId 1: No prior Full backup Job record found.
28-Jul 20:49 bacula-dir JobId 1: No prior or suitable Full backup found in catalog. Doing FULL backup.
28-Jul 20:49 bacula-dir JobId 1: Start Backup JobId 1, Job=BackupClient1.2015-07-28_20.49.11_03
28-Jul 20:49 bacula-dir JobId 1: Created new Volume="Vol-0001", Pool="File", MediaType="File1" in catalog.
28-Jul 20:49 bacula-dir JobId 1: Using Device "FileChgr1-Dev1" to write.
28-Jul 20:49 bacula-sd JobId 1: Labeled new Volume "Vol-0001" on file device "FileChgr1-Dev1" (/tmp).
28-Jul 20:49 bacula-sd JobId 1: Wrote label to prelabeled Volume "Vol-0001" on file device "FileChgr1-Dev1" (/tmp)
28-Jul 20:49 bacula-sd JobId 1: Elapsed time=00:00:10, Transfer rate=3.822 M Bytes/second
28-Jul 20:49 bacula-sd JobId 1: Sending spooled attrs to the Director. Despooling 100,358 bytes ...
28-Jul 20:49 bacula-dir JobId 1: Bacula bacula-dir 7.0.5 (28Jul14):
Build OS: x86_64-redhat-linux-gnu redhat (Core)
JobId: 1
Job: BackupClient1.2015-07-28_20.49.11_03
Backup Level: Full (upgraded from Incremental)
Client: "bacula-fd" 7.0.5 (28Jul14) x86_64-redhat-linux-gnu,redhat,(Core)
FileSet: "Full Set" 2015-07-28 20:49:11
Pool: "File" (From Job resource)
Catalog: "MyCatalog" (From Client resource)
Storage: "File1" (From Job resource)
Scheduled time: 28-Jul-2015 20:49:06
Start time: 28-Jul-2015 20:49:13
End time: 28-Jul-2015 20:49:23
Elapsed time: 10 secs
Priority: 10
FD Files Written: 373
SD Files Written: 373
FD Bytes Written: 38,186,799 (38.18 MB)
SD Bytes Written: 38,225,648 (38.22 MB)
Rate: 3818.7 KB/s
Software Compression: None
VSS: no
Encryption: no
Accurate: no
Volume name(s): Vol-0001
Volume Session Id: 1
Volume Session Time: 1438105458
Last Volume Bytes: 38,265,638 (38.26 MB)
Non-fatal FD errors: 0
SD Errors: 0
FD termination status: OK
SD termination status: OK
Termination: Backup OK
28-Jul 20:49 bacula-dir JobId 1: Begin pruning Jobs older than 6 months .
28-Jul 20:49 bacula-dir JobId 1: No Jobs found to prune.
28-Jul 20:49 bacula-dir JobId 1: Begin pruning Files.
28-Jul 20:49 bacula-dir JobId 1: No Files found to prune.
28-Jul 20:49 bacula-dir JobId 1: End auto prune.
*