How to configure a remote client on Bacula server machine

Install a package on a new remote Bacula client host

# yum install bacula-client bacula-console

Configure Bacula Server.

# mkdir /etc/bacula/conf.d 
# vim /etc/bacula/bacula-dir.conf
@|"find /etc/bacula/conf.d -name '*.conf' -type f -exec echo
@{} \;"

Add Remote File Pool on Bacula Server

# vim /etc/bacula/conf.d/pools.conf
Pool {
 Name = RemoteFile
 Pool Type = Backup
 Label Format = Remote-
 Recycle = yes # Bacula can
automatically recycle Volumes
 AutoPrune = yes # Prune expired volumes
 Volume Retention = 365 days # one year
 Maximum Volume Bytes = 50G # Limit Volume size to
something reasonable
 Maximum Volumes = 100 # Limit number of Volumes
in Pool
}

Add Client on Bacula Server

# vim /etc/bacula/conf.d/clients.conf
Client {
 Name = ClientHost-fd
 Address = host.bitscentric.com
 FDPort = 9102
 Catalog = MyCatalog
 Password = "ZDUyMmEzYzdjNWRkN2YyZWYyYTEwY2Y2O" #
 password for Remote FileDaemon
 File Retention = 30 days # 30 days
 Job Retention = 6 months # six months
 AutoPrune = yes # Prune expired
 Jobs/Files
}
Job {
 Name = "BackupClientHost"
 JobDefs = "DefaultJob"
 Client = ClientHost-fd
 Pool = RemoteFile
 FileSet= "Home and Etc"
}

Add Client File Set on Bacula Server

# vim /etc/bacula/conf.d/filesets.conf
FileSet {
 Name = "Home and Etc"
 Include {
 Options {
 signature = MD5
 compression = GZIP
}
 File = /
 #File = /home
 #File = /etc
 }
 Exclude {
 File = /home/bacula/not_important
 }
}

Check that your configuration file has the correct syntax with the following command:

# bacula-dir -tc /etc/bacula/bacula-dir.conf

Restart the bacula service

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

Configure Bacula Client

# date +%s | sha256sum | base64 | head -c 33 ; echo
# vim /etc/bacula/bacula-fd.conf
Director {
 Name = bacula-dir
 #Name = BackupServer-dir
 Password = "ZDUyMmEzYzdjNWRkN2YyZWYyYTEwY2Y2O"
}
FileDaemon { # this is me
 Name = ClientHost-fd
 FDAddress = host.bitscentric.com
 FDport = 9102 # where we listen for the director
 WorkingDirectory = /var/spool/bacula
 Pid Directory = /var/run
 Maximum Concurrent Jobs = 20
 Plugin Directory = /usr/lib64/bacula
}

Check that your configuration file has the correct syntax with the following command:

# bacula-fd -tc /etc/bacula/bacula-fd.conf

Start bacula services

# systemctl restart bacula-fd.service
# systemctl start bacula-fd.service
# systemctl enable bacula-fd.service
# systemctl status bacula-fd.service

Test Client Connection on bacula Server and backup client file

Perform Backup operation on your Bacula Server, enter the Bacula Console:

[root@baculaserver ~]# bconsole
Connecting to Director localhost:9101
1000 OK: 10002 bacula-dir Version: 11.0.1 (05 February 2020)
Enter a period to cancel a command.
*label
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
The defined Storage resources are:
 1: File1
 2: File2
Select Storage resource (1-2): 1
Connecting to Storage daemon File1 at
baculaserver.localhost.com:9103 ...
Enter new Volume name: MyClient
Defined Pools:or Enter for none):
 1: Default
 2: File
 3: RemoteFile
 4: Scratch
Select the Pool (1-4): 3
Connecting to Storage daemon File1 at
baculaserver.localhost.com:9103 ...
Sending label command for Volume "MyClient" Slot 0 ...
3000 OK label. VolBytes=243 VolABytes=0 VolType=1
Volume="MyClient" Device="FileChgr1-Dev1" (/bacula/backup)
Catalog record for Volume "MyClient", Slot 0 successfully
created.
Requesting to mount FileChgr1 ...
3906 File device ""FileChgr1-Dev1" (/bacula/backup)" is always
mounted.
You have messages.
*run
A job name must be specified.
The defined Job resources are:
 1: BackupServerFiles
 2: BackupCatalog
 3: RestoreServerFiles
 4: BackupClientHost
Select Job resource (1-4): 4
Run Backup job
JobName: BackupClientHost
Level: Incremental
Client: ClientHost-fd
FileSet: Home and Etc
Pool: RemoteFile (From Job resource)
Storage: File1 (From Job resource)
When: 2025-01-14 11:17:43
Priority: 10
OK to run? (yes/mod/no): yes
Job queued. JobId=32
*status director
bacula-dir Version: 11.0.1 (05 February 2020) x86_64-redhatlinux-gnu redhat Beta
Daemon started 14-Jan-25 11:16, conf reloaded 14-Jan-2025
11:16:40
Jobs: run=0, running=1 mode=0,0
Crypto: fips=N/A crypto=OpenSSL
Heap: heap=536,576 smbytes=453,435 max_bytes=453,435 bufs=455
max_bufs=456
Res: njobs=4 nclients=2 nstores=2 npools=4 ncats=1 nfsets=3
nscheds=2
Scheduled Jobs:
Level Type Pri Scheduled Job Name 
Volume
===============================================================
====================
Incremental Backup 10 14-Jan-25 23:05 
BackupServerFiles MyServer
Incremental Backup 10 14-Jan-25 23:05 
BackupClientHost MyClientRockyBackup
Full Backup 11 14-Jan-25 23:10 BackupCatalog 
MyServer
====
Running Jobs:
Console connected at 14-Jan-25 11:17
JobId Type Level Files Bytes Name 
Status
===============================================================
=======
 32 Back Full 0 0 BackupClientHost is
running
====
Terminated Jobs:
JobId Level Files Bytes Status Finished 
Name
===============================================================
=====
18 Full 107,218 1.324 G OK 13-Jan-25 16:54
BackupClient1
 21 Restore 107,218 2.431 G OK 13-Jan-25 17:39
RestoreFiles
 22 Incr 386 18.96 M OK 13-Jan-25 19:00
BackupClient1
 23 Incr 115 30.09 M OK 13-Jan-25 23:49
BackupClient1
 25 Full 107,162 1.343 G OK 14-Jan-25 00:03
BackupServerFiles
 27 Restore 107,162 2.461 G OK 14-Jan-25 00:18
RestoreServerFiles
 28 Full 0 0 Error 14-Jan-25 00:28
BackupClientHost
 29 Full 0 0 Error 14-Jan-25 00:37
BackupClientHost
 30 Full 2,591 10.35 M OK 14-Jan-25 11:01
BackupClientHost
 31 Restore 0 0 Error 14-Jan-25 11:16
RestoreServerFiles
====
*status director
bacula-dir Version: 11.0.1 (05 February 2020) x86_64-redhatlinux-gnu redhat Beta
Daemon started 14-Jan-25 11:16, conf reloaded 14-Jan-2025
11:16:40
Jobs: run=0, running=1 mode=0,0
Crypto: fips=N/A crypto=OpenSSL
Heap: heap=536,576 smbytes=454,077 max_bytes=454,368 bufs=457
max_bufs=460
Res: njobs=4 nclients=2 nstores=2 npools=4 ncats=1 nfsets=3
nscheds=2
Scheduled Jobs:
Level Type Pri Scheduled Job Name 
Volume
===============================================================
====================
Incremental Backup 10 14-Jan-25 23:05 
BackupServerFiles MyServer
Incremental Backup 10 14-Jan-25 23:05 
BackupClientHost MyClient
Full Backup 11 14-Jan-25 23:10 BackupCatalog 
MyServer
====
Running Jobs:
Console connected at 14-Jan-25 11:17
JobId Type Level Files Bytes Name 
Status
===============================================================
=======
 32 Back Full 193,215 3.796 G BackupClientHost is
running
====
Terminated Jobs:
JobId Level Files Bytes Status Finished 
Name
===============================================================
=====
 18 Full 107,218 1.324 G OK 13-Jan-25 16:54
BackupClient1
 21 Restore 107,218 2.431 G OK 13-Jan-25 17:39
RestoreFiles
 22 Incr 386 18.96 M OK 13-Jan-25 19:00
BackupClient1
 23 Incr 115 30.09 M OK 13-Jan-25 23:49
BackupClient1
 25 Full 107,162 1.343 G OK 14-Jan-25 00:03
BackupServerFiles
 27 Restore 107,162 2.461 G OK 14-Jan-25 00:18
RestoreServerFiles
28 Full 0 0 Error 14-Jan-25 00:28
BackupClientHost
 29 Full 0 0 Error 14-Jan-25 00:37
BackupClientHost
 30 Full 2,591 10.35 M OK 14-Jan-25 11:01
BackupClientHost
 31 Restore 0 0 Error 14-Jan-25 11:16
RestoreServerFiles
====
*exit
[root@baculaserver conf.d]# bconsole
Connecting to Director localhost:9101
1000 OK: 10002 bacula-dir Version: 11.0.1 (05 February 2020)
Enter a period to cancel a command.
*status director
bacula-dir Version: 11.0.1 (05 February 2020) x86_64-redhatlinux-gnu redhat Beta
Daemon started 14-Jan-25 11:16, conf reloaded 14-Jan-2025
11:16:40
Jobs: run=1, running=0 mode=0,0
Crypto: fips=N/A crypto=OpenSSL
Heap: heap=536,576 smbytes=375,141 max_bytes=455,231 bufs=428
max_bufs=460
Res: njobs=4 nclients=2 nstores=2 npools=4 ncats=1 nfsets=3
nscheds=2
Scheduled Jobs:
Level Type Pri Scheduled Job Name 
Volume
===============================================================
====================
Incremental Backup 10 14-Jan-25 23:05 
BackupServerFiles MyServer
Incremental Backup 10 14-Jan-25 23:05 
BackupClientHost MyClient
Full Backup 11 14-Jan-25 23:10 BackupCatalog 
MyServer
====
Running Jobs:
Console connected at 14-Jan-25 12:24
No Jobs running.
====
Terminated Jobs:
JobId Level Files Bytes Status Finished 
Name
===============================================================
=====
 21 Restore 107,218 2.431 G OK 13-Jan-25 17:39
RestoreFiles
 22 Incr 386 18.96 M OK 13-Jan-25 19:00
BackupClient1
 23 Incr 115 30.09 M OK 13-Jan-25 23:49
BackupClient1
 25 Full 107,162 1.343 G OK 14-Jan-25 00:03
BackupServerFiles
 27 Restore 107,162 2.461 G OK 14-Jan-25 00:18
RestoreServerFiles
 28 Full 0 0 Error 14-Jan-25 00:28
BackupClientHost
 29 Full 0 0 Error 14-Jan-25 00:37
BackupClientHost
 30 Full 2,591 10.35 M OK 14-Jan-25 11:01
BackupClientHost
 31 Restore 0 0 Error 14-Jan-25 11:16
RestoreServerFiles
 32 Full 206,647 4.714 G OK 14-Jan-25 12:03
BackupClientHost
====
*exit

Leave a Reply

Your email address will not be published. Required fields are marked *