Fileset Examples
EnterpriseBacula Enterprise Only
This solution is only available for Bacula Enterprise. For subscription inquiries, please reach out to sales@baculasystems.com.
The S3 Plugin is flexible enough to configure almost any type of
desired backup. Multiple Plugin= lines should not be specified in
the Include section of a Fileset for the S3 Plugin.
Fileset examples for different scenarios are shown below.
Setup external config file and backup mybucket of AWS:
Fileset {
Name = FS_MYBUCKET
Include {
Options {
signature = MD5
}
Plugin = "s3: config_file=/opt/bacula/etc/s3.settings bucket=mybucket"
}
}
$ cat /opt/bacula/etc/s3.settings
access_key=XXXXXXXXXXXXXXXXXXX
secret_key=YYYYYYYYYYYYYYYYYYY
region=us-east-1
bucket=mybucket
Increase number of threads:
Fileset {
Name = fs-s3-concurrent
Include {
Options {
signature = MD5
}
Plugin = "s3: access_key=XXXXXXXXXXXXXXX secret_key=YYYYYYYYYYYYYYYY concurrent_threads=10"
}
}
Enable force_path_style in order to connect properly with some generic S3 solutions (like MinIO or Ceph):
Fileset {
Name = fs-s3-concurrent
Include {
Options {
signature = MD5
}
Plugin = "s3: access_key=XXXXXXXXXXXXXXX secret_key=YYYYYYYYYYYYYYYY force_path_style=yes"
}
}
Backup all the buckets associated to the provided keys on AWS in region us-east-2:
Fileset {
Name = fs-s3-all-buckets
Include {
Options {
signature = MD5
}
Plugin = "s3: access_key=XXXXXXXXXXXXXXX secret_key=YYYYYYYYYYYYYYYY region=us-east-2"
}
}
Backup folders A and B in the bucket ‘mybucket’ of region us-west-1 (default region):
Fileset {
Name = fs-s3-mybucket-A-B
Include {
Options {
signature = MD5
}
Plugin = "s3: access_key=XXXXXXXXXXXXXXX secret_key=YYYYYYYYYYYYYYYY bucket=mybucket folder=A,B"
}
}
Backup folders starting with A in the bucket ‘mybucket’ of region us-west-1 (default region):
Fileset {
Name = fs-mybucket-startA
Include {
Options {
signature = MD5
}
Plugin = "s3: access_key=XXXXXXXXXXXXXXX secret_key=YYYYYYYYYYYYYYYY bucket=mybucket folder_regex_include=A.*"
}
}
Backup bucket ‘mybucket’ and run retrievals for glacier objects, also wait for them so they are backed up. Use ‘expedited’ type with 30 days of retention after completing the retrievals:
Fileset {
Name = fs-s3-mybucket-glacier
Include {
Options {
signature = MD5
}
Plugin = "s3: access_key=XXXXXXXXXXXXXXX secret_key=YYYYYYYYYYYYYYYY bucket=mybucket glacier_mode=RETRIEVAL_WAIT_DOWNLOAD glacier_tier=EXPEDITED glacier_days=30"
}
}
Backup bucket ‘mybucket’, but do not get objects from GLACIER_IR, also get information only from 2022:
Fileset {
Name = fs-s3-mybucket-no-ir-2022
Include {
Options {
signature = MD5
}
Plugin = "s3: access_key=XXXXXXXXXXXXXXX secret_key=YYYYYYYYYYYYYYYY bucket=mybucket storageclass_exclude=GLACIER_IR date_from=\"2022-01-01 00:00:00\" "
}
}
See also
Previous articles:
Go back to: S3 Plugin: Configuration.