SvennD
Concurrent Jobs in Bareos with disk storage
April 3, 2019

Concurrent Jobs in Bareos with disk storage

Posted on April 3, 2019  •  3 minutes  • 517 words  •  Suggest Changes

Surprisingly perhaps for newbies such as myself; Bareos will only start one backup job at once; meaning if you got 100 clients, there will be a serieus delay between the first and last job. So why is this happening ?

Bareos is a fork off Bacula and this was originally developed for the use of other types of media, such as tapes, DVD/CD and disks. In current age you might think only disks remain, but that’s incorrect; While DVD/CD’s are legacy media, tapes are still very much used. Here we use LTO tapes although not (yet?) in combination with Bareos. Tapes however are not random access and in allot situations only one tape can be loaded at once;

Hence only one backup could run at once, unless you had multiple devices. So disk storage users, have to trick Bareos to run multiple backups at once in order to work around the whole tape issue;

More devices

Make more devices in the storage deamon; however be specific to only set 1 maximum concurrent jobs;

/etc/bareos/bareos-sd.d/device/FileStorage.conf

Device {
  Name = FileStorage
  Media Type = File
  #Archive Device = /var/lib/bareos/storage
  Archive Device = /storage/block1
  LabelMedia = yes;                   # lets Bareos label unlabeled media
  Random Access = yes;
  AutomaticMount = yes;               # when device opened, read it
  RemovableMedia = no;
  AlwaysOpen = no;
  Description = "File device. A connecting Director must have the same Name and MediaType."
 
}

Change this to :

Device {
  Name = FileStorage0
  Media Type = File
  #Archive Device = /var/lib/bareos/storage
  Archive Device = /storage/block1
  LabelMedia = yes;                   # lets Bareos label unlabeled media
  Random Access = yes;
  AutomaticMount = yes;               # when device opened, read it
  RemovableMedia = no;
  AlwaysOpen = no;
  Description = "File device. A connecting Director must have the same Name and MediaType."
  Maximum Concurrent Jobs = 1
}

Device {
  Name = FileStorage1
  Media Type = File
  #Archive Device = /var/lib/bareos/storage
  Archive Device = /storage/block1
  LabelMedia = yes;                   # lets Bareos label unlabeled media
  Random Access = yes;
  AutomaticMount = yes;               # when device opened, read it
  RemovableMedia = no;
  AlwaysOpen = no;
  Description = "File device. A connecting Director must have the same Name and MediaType."
  Maximum Concurrent Jobs = 1
}

Device {
  Name = FileStorage2
  Media Type = File
  #Archive Device = /var/lib/bareos/storage
  Archive Device = /storage/block1
  LabelMedia = yes;                   # lets Bareos label unlabeled media
  Random Access = yes;
  AutomaticMount = yes;               # when device opened, read it
  RemovableMedia = no;
  AlwaysOpen = no;
  Description = "File device. A connecting Director must have the same Name and MediaType."
  Maximum Concurrent Jobs = 1
}

Then let the director know :

/etc/bareos/bareos-dir.d/storage/File.conf

add the Devices :

Storage {
  Name = File
  Address = bareos                # N.B. Use a fully qualified name here (do not use "localhost" here).
  Password = "Re/vZBBjYg1Nm65DycOKtjiw0+WH7Byp3VTeifzhIlSl"
  Device = FileStorage3
  Device = FileStorage0
  Device = FileStorage1
  Device = FileStorage2
  Media Type = File
  Maximum Concurrent Jobs = 10
}

And finish up with restarting the service :

systemctl restart bareos-fd
systemctl restart bareos-sd
systemctl restart bareos-dir

Now concurrent jobs can run on these 4 devices 🙂

 

Support

If you enjoyed this website, consider buying me a Dr. Pepper

Buy me a Dr PepperBuy me a Dr Pepper