This document is a continuation of basic backup configuration. In this lab setup the Bacula Director and Storage sit in a private network connected to internet via CGNAT, and need to backup a server hosted on the internet.
While the Bacula-Director will be able to access the Bacula-Client on the internet, the challenge will be for the Bacula-Client to access the Bacula-Storage which is hosted inside a CGNAT network. One of the recommended solution is to use pinggy. Refer the document Pinggy – Expose Servers hosted within private network to configure network.
To enable the backup, we need to add the following blocks in bacula-dir which will be hosted inside the CGNAT network.
====== ==== ==== === =====
Job {
Name = “ShijuVargheseRemoteBackup”
JobDefs = “DefaultJob”
Type = Backup
Client = shijuvarghese-client-fd
FileSet = ShijuVarghese-FileSet
Schedule = “WeeklyCycle”
Messages = Standard
Storage = shijuVarghese-File-Storage
}
Client {
Name = shijuvarghese-client-fd
Address = shijuvarghese.com
FDPort = 9102
Password = “thSecretKey”
File Retention = 30 days
Job Retention = 6 months
AutoPrune = yes
Catalog = MyCatalog
}
FileSet {
Name = ShijuVarghese-FileSet
Include {
Options {
signature = SHA1
compression = GZIP
}
File = /home/shijuvarghese/public_html/test
}
}
Storage {
Name = shijuVarghese-File-Storage
Address = xxxxxxxxxxxxx.run.pinggy-free.link ### You get this from Pinggy
SDPort = 46847 #### You get this from Pinggy
Password = “@@SD_PASSWORD@@”
Device = FileStorage
Media Type = File
}
====== ==== ==== === =====
Restart the Bacula Director.
The Bacula-Client hosted in a server in the internet should have the below entries in bacula-fd-conf.
======= ===== ==== ===
Director {
Name = bacula-dir ## This should match the name configured in Director
Password = “thSecretKey” ##This should match the password mentioned in Director
}
Director {
Name = bacula-mon
Password = “@@MON_FD_PASSWORD@@”
Monitor = yes
}
FileDaemon {
Name = shijuvarghese-client-fd ## This is the client name configured in Director
FDport = 9102
WorkingDirectory = /var/spool/bacula
Pid Directory = /var/run
Maximum Concurrent Jobs = 20
Plugin Directory = /usr/lib64/bacula
}
Messages {
Name = Standard
director = bacula-dir = all, !skipped, !restored, !saved
append = /var/log/bacula/bacula-fd.log = all, saved, restored
}
==== ==== ==== ==== ==
Restart the Bacula-Client