This episode covers Bacula storage integration: S3 cloud targets in Enterprise and Community via rclone/storage, cloud retention strategies, autoloader configuration with a SCSI changer, slot mapping, and using barcodes for tape library management.

Two worlds meet in episode 19: the classic tape library and the modern cloud storage. Bacula stands between both — it's still one of the few enterprise backups that treats tape seriously, while also being able to write to S3 object storage for cloud retention. Mature administrators master both.
We start with cloud (since many are waiting for it), then descend to the changer, which is the heart of tape library management.
Cloud provides what tape can't easily give: offsite replication without physical handling. Backing up to the cloud means your data is available at another location without transporting media. This is attractive for DR, but it has a price: egress costs on restore, latency, and network dependency.
Community has no built-in cloud connector, but can use rclone mounted as a filesystem:
rclone config create mys3 s3 provider AWS \
access_key_id ... secret_access_key ... region ap-southeast-1
rclone mount mys3:bucket-bacula /mnt/bacula-cloud --daemonThen point a Bacula storage device at the mount directory:
Device {
Name = CloudStorage
MediaType = File
Archive Device = /mnt/bacula-cloud
Random Access = yes
AutomaticMount = yes
RemovableMedia = no
}rclone handles the block synchronization to S3; Bacula treats it as a regular filesystem. Simple, but:
Bacula Enterprise provides a native cloud plugin that writes directly to S3 (and S3-compatible variants like MinIO) without a filesystem mount. Its advantages: bandwidth control, optimized multi-part uploads, and managed error handling. For large volumes, this is more reliable than a filesystem mount.
Warning
Backing up to the cloud without checksum verification is a gamble. rclone has --check and Bacula has signature checksums in FileSets — make sure one of them is active, because silently corrupted cloud data is the most dangerous scenario.
Cloud gets expensive if filled without discipline. Apply layered retention:
Volume Retention and AutoPrune, plus Maximum Volume Bytes so it doesn't balloon.Pool {
Name = CloudPool
Pool Type = Backup
Recycle = yes
AutoPrune = yes
Volume Retention = 90 days
Maximum Volume Bytes = 50 GB
}A common pattern: daily backups to local disk, then a Copy/Migration job moves important volumes to the cloud — disk for speed, cloud for long retention.
An autoloader communicates through a SCSI changer device — usually /dev/sgX. Bacula doesn't speak SCSI directly; it calls the mtx-changer script that wraps the mtx tool:
Device {
Name = Changer
DeviceType = Changer
Changer Device = /dev/sg2
Changer Command = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d"
Changer Devices = "TapeDrive"
}
Device {
Name = TapeDrive
MediaType = LTO-9
Archive Device = /dev/nst0
Random Access = no
RemovableMedia = yes
}Verify that mtx sees the changer correctly:
sudo mtx -f /dev/sg2 statusThe output shows every slot and drive: Data Transfer Element:Full means a tape is in the drive; Storage Element N:Full means the slot is occupied.
A tape library has numbered slots; Bacula maps slots to volumes via labels. The standard operations:
* label slot=4 pool=TapePool
* list volumes pool=TapePoolImportant rules: never place a tape in a slot not registered in Bacula without a label, and don't move tapes between slots on assumption. Bacula follows barcodes, not slots.
Tape barcodes let Bacula physically recognize a tape without guessing slot positions. A barcode is a printed label stuck on the tape — usually read through a window on the cartridge.
* label barcodes pool=TapePoolWith barcodes, you can swap tape positions between slots and Bacula still knows which tape is which. An autoloader without barcodes makes library management depend on static physical positions — fragile if human hands move media.
Tip
The first investment when buying a library is a barcode kit. It's cheap compared with the cost of a manual labeling mistake — and you already know from episode 11 that a wrong label is the root of restore-disaster scenarios.
status device regularly: unexpected empty slots, drives erroring out.Key takeaways:
mtx-changer; mtx -f /dev/sgX status checks slots/drives.label slot=N; label barcodes for the whole library.In the next episode, episode 20, we'll optimize performance and monitoring — concurrent jobs, spool size, device polling, benchmarks, monitoring via bconsole, Nagios/Zabbix plugins, and job-failure alerts. This is the bridge between a system that "runs" and a system that is "watched".