Hello,

It says here to send an email to this list to get help with the Bacula 
Community software. I hope it works, because I’m having a hard time finding 
anywhere else to get help. Thank you ahead of time!

I am trying to use Bacula on a website server to backup to Amazon’s AWS Cloud. 
There are a couple places I’m stuck, having researched and tried everything I 
could find, but still not getting very far. 

One is with connecting to the AWS S3 bucket “instance” from the server, the 
other concerns connecting with the File Daemon on the server from the Director 
(both on the same machine). 

The server is running the RHEL 9 OS, and I have Bacula Community 11.0.1 
installed. 

Regarding the AWS problem, I have the AWS account all set up, with the S3 
bucket, keys, a DNS address, the port set up, etc., and so, as I understand it, 
I should be able to connect to it from the server using Bacula.
But when Bacula tries to connect, I get: "Warning: bsockcore.c:258 Could not 
connect to Storage daemon on ec2-<ID>.us-west-1.compute.amazonaws.com:9103. 
ERR=Connection refused"
See my config files, as presently configured, below (I've tried many 
iterations, based on examples found online). 
Regarding the File Daemon problem, when I try to run a job from the Bacula 
console (CLI), I get: No authorization. Client "server.example.com-fd". Job not 
run. (I substituted "example" for our actual server name.)

The "Director" section in the bacula-fd.conf file has the password set 
correctly, matching the one in bacula-dir.conf for the "Client" section (see 
below). So I don't get why it won't authorize.

I checked, and the actual daemons are running, and the ports are not blocked 
(eg, telnet 127.0.0.1 9103 works). 

Configuration file tests pass.
How can I get this working? Do I get an email when someone responds? Thanks for 
any help!
James Israel

config files: 
bacula-fd.conf:
#
# Bacula File Daemon Configuration file
#

#
# List Directors who are permitted to contact this File daemon
#
Director {
  Name = backup-dir
  Password = "<dir-pw>"
}

#
# Restricted Director, used by tray-monitor
#
Director {
  Name = backup-mon
  Password = "<mon-pw>"
  Monitor = yes
}

# Cloud Director
 Director {
   Name = dir.clouddir
   Password = "<cloud-pw>"
}

#
# "Global" File daemon configuration specifications
#
FileDaemon {
  Name = server.humortimes.com-fd
  FDport = 9102
  WorkingDirectory = /var/lib/bacula
  Pid Directory = /var/run
  Maximum Concurrent Jobs = 8
 }

# Send all messages except skipped files back to Director
Messages {
   Name = Standard
   director = backup-dir = all
}

bacula-sd.conf:
#
# Bacula Storage Daemon Configuration file
#

Storage {
  Name = sd.cloudsd2
  SDPort = 9103      # Director's port
  WorkingDirectory = "/var/lib/bacula"
  Pid Directory = "/var/run"
  Maximum Concurrent Jobs = 8
}

#
# List Directors who are permitted to contact Storage daemon
#
Director {
  Name = backup-dir
  Password = "<dir-pw>"
}

#
# Restricted Director, used by tray-monitor to get the
#   status of the storage daemon
#
Director {
  Name = backup-mon
  Password = "<mon-pw>"
  Monitor = yes
}

# Cloud director
Director {
  Name = dir.clouddir
  Password = "<cloud-pw>"
}

Autochanger {
  Name = chgr.cloudsd2
  Device = dev.cloud1
  Changer Command = "/usr/libexec/bacula/mtx-changer %c %o %S %a %d"
  Changer Device = /dev/null
}

#
# Devices supported by this Storage daemon
#
# Amazon Cloud storage
#
Device{
 Name=dev.cloud1
 DeviceType=Cloud
 Cloud=S3Cloud
 ArchiveDevice=/opt/bacula/backups
 MaximumPartSize=10 MB
 MediaType=CloudType
 LabelMedia=yes
 RandomAccess=Yes;
 AutomaticMount=yes
 RemovableMedia=no
 AlwaysOpen=no
 AutoChanger=yes
}

Cloud{
 Name=S3Cloud
 Driver="S3"
 HostName="s3.amazonaws.com"
 BucketName="htsync"
 AccessKey="<key>" #server-sync IAM user
 SecretKey="<key>"
 Protocol=HTTPS
 UriStyle=VirtualHost
 TruncateCache=No
 Upload=EachPart
 Region="us-west-1"
 MaximumUploadBandwidth=5MB/s
}

#
# Send all messages to the Director,
#
Messages {
  Name = Standard
  director = backup-dir = all
}

bacula-dir.conf (minus pool and message setups):

#
#   Bacula Director Configuration file
#

Director { 
  Name = backup-dir
  DIRport = 9101  
  QueryFile = "/etc/bacula/scripts/query.sql"
  WorkingDirectory = "/var/spool/bacula"
  PidDirectory = "/var/run"
  Maximum Concurrent Jobs = 8
  Password = "dir-pw"
  Messages = Daemon
  FD Connect Timeout = 2min
  DirAddress = 127.0.0.1
}

#
#Job Defs
#
JobDefs {
        Name = "DefaultJob"
        Type = Backup
        Level = Incremental
        Client = server.humortimes.com-fd
        FileSet = "Full Set"
        Schedule = "WeeklyCycle"
        Storage = chgr.cloudsd2 # autochanger
        Messages = "Standard"
        Pool = Default
        Full Backup Pool = Full-Pool
        Differential Backup Pool = Diff-Pool
        Incremental Backup Pool = Inc-Pool
        Prefer Mounted Volumes = no
        Maximum Concurrent Jobs = 8
        Prune Files = yes
        Prune Jobs = yes
        Prune Volumes = yes
        Priority = 10
}

# Backup job
Job {
  Name = "BackupLocalFiles"
  JobDefs = "DefaultJob"
}

# Backup the catalog database (after the nightly save)
Job {
  Name = "BackupCatalog"
  JobDefs = "DefaultJob"
  Level = Full
  FileSet="MyCatalog"
  Schedule = "WeeklyCycleAfterBackup"
  RunBeforeJob = "/usr/bin/awk -f /etc/bacula/scripts/make_catalog_backup.pl -v 
cat1=MyCatalog /etc/bacula/bacula-dir.conf"
  RunAfterJob  = "/etc/bacula/scripts/delete_catalog_backup"
  Priority = 11        # run after main backup
}

# Restore job
Job {
  Name = "RestoreLocalFiles"
  Type = Restore
  Client = server.humortimes.com-fd
  FileSet = "Full Set"
  Storage = chgr.cloudsd2 # autochanger
  Pool = Default
  Messages = Standard
  Where = /bacula/restore
}

#
# List of files to be backed up
#
FileSet {
     Name = "Full Set"
     Include {
           Options {
                signature = MD5
                compression = GZIP6
           }
# single file for testing
    File = /etc/bacula/test.txt
}

#
# When to do the backups
#
Schedule {
  Name = "WeeklyCycle"
  Run = Full 1st sun at 1:05
  Run = Differential 2nd-5th sun at 1:05
  Run = Incremental mon-sat at 1:05
}

#
# Client (File Services) to backup. Use gen_cli.pl to add new server!!!
#
Client {
  Name = server.humortimes.com-fd  ##The file daemon name of the client
  Address = 127.0.0.1
  FDPort = 9102
  Catalog = MyCatalog
  Password = "mon-pw" (tried dir-pw & cloud-pw as well)
  File Retention = 1 year
  Job Retention = 1 year
  AutoPrune = yes
}

#
# autochanger for Amazon AWS
# DNS string "Address" is from AWS account:
#
Autochanger{
 Name=chgr.cloudsd2 
 Address=ec2-54-176-177-246.us-west-1.compute.amazonaws.com
 SDPort=9103 
 Password="cloud-pw" (tried dir-pw & mon-pw as well)
 Device=chgr.cloudsd2 
 MediaType=Cloud
 MaximumConcurrentJobs=8
 Autochanger=chgr.cloudsd2
}

#
# Definition of file storage device
#
Storage {
  Name = sd.cloudsd2
  SDPort = 9103
  Address = ec2-<dns>.us-west-1.compute.amazonaws.com
  Password = "cloud-pw" (tried dir-pw & mon-pw as well)
  Device = dev.cloud1
  MediaType = CloudType
  Autochanger = chgr.cloudsd2
  MaximumConcurrentJobs = 8
}

#
# Generic catalog service
#
Catalog {
  Name = MyCatalog
  dbname = "bacula"; dbuser = "bacula"; dbpassword = "database-pw"
}

#
# Restricted console used by tray-monitor to get the status of the director
#
Console {
  Name = backup-mon
  Password = "mon-pw"
  JobACL = *all*
  ClientACL = status, .clients, .jobs, .pools, .storage, .filesets, .messages, 
.defaults, run, restore, cloud, wait
  StorageACL = *all*
  ScheduleACL = *all*
  PoolACL = *all*
  FileSetACL = *all*
  CatalogACL = *all*
  CommandACL = *all*
  WhereACL = *all*
}


_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to