Skip to content

Commit

Permalink
droplet: update example
Browse files Browse the repository at this point in the history
  • Loading branch information
joergsteffens committed Jun 14, 2018
1 parent 99d9fd7 commit b29bd50
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 25 deletions.
38 changes: 22 additions & 16 deletions README.droplet
Expand Up @@ -12,16 +12,17 @@ The droplet S3 can only be used with virtual-hosted-style buckets like http://<b
Path-style buckets are not supported when using the droplet S3.

On the Storage Daemon the following configuration is needed.
Example bareos-sd.d/device/S3_1-00.conf file:
Example bareos-sd.d/device/S3_ObjectStorage.conf file:

Device {
Name = "S3_1-00"
Media Type = "S3_File_1"
Archive Device = "Object S3 Storage"
Name = S3_ObjectStorage
Media Type = S3_Object1
Archive Device = S3 Object Storage

#
# Config options:
# profile= - Droplet profile to use either absolute PATH or logical name (e.g. ~/.droplet/<profile>.profile
# location= - AWS location (e.g. us-east etc.)
# Device Options:
# profile= - Droplet profile path, e.g. /etc/bareos/bareos-sd.d/droplet/droplet.profile
# location= - AWS location (e.g. us-east etc.). Optional.
# acl= - Canned ACL
# storageclass= - Storage Class to use.
# bucket= - Bucket to store objects in.
Expand All @@ -31,7 +32,13 @@ Device {
# retries= - Number of retires if a write fails (0-255, default = 0, which means unlimited retries)
# mmap - Use mmap to allocate Chunk memory instead of malloc().
#
Device Options = "profile=/etc/bareos/bareos-sd.d/droplet/droplet.profile,bucket=backup-bareos,chunksize=100M"

# testing:
Device Options = "profile=/etc/bareos/bareos-sd.d/droplet/droplet.profile,bucket=bareos-bucket,chunksize=100M,iothreads=0,retries=1"

# performance:
#Device Options = "profile=/etc/bareos/bareos-sd.d/droplet/droplet.profile,bucket=bareos-bucket,chunksize=100M"

Device Type = droplet
LabelMedia = yes # lets Bareos label unlabeled media
Random Access = yes
Expand All @@ -44,7 +51,6 @@ Device {
Maximum Spool Size = 15000M
}


The droplet.profile file holds the credentials for S3 storage
Example /etc/bareos/bareos-sd.d/droplet/droplet.profile file:

Expand All @@ -60,22 +66,22 @@ pricing_dir = ""
backend = s3
aws_auth_sign_version = 2

If the pricing_dir is not empty, it will create an <dir>/droplet.csv file wich
will record all S3 operations.
See the 'libdroplet/src/pricing.c' code for an explanation.
If the pricing_dir is not empty,
it will create an <profile_directory>/droplet.csv file which will record all S3 operations.
See the code at https://github.com/bareos/Droplet/blob/bareos-master/libdroplet/src/pricing.c for an explanation.

The parameter "aws_auth_sign_version = 2" is for the connection to a CEPH AWS connection.
The parameter "aws_auth_sign_version = 2" is for the connection to a CEPH S3 gateway.
For use with AWS S3 the aws_auth_sign_version, must be set to "4".

On the Director you connect to the Storage Device with the following configuration
Example bareos-dir.d/storage/S3_1-00.conf file:

Storage {
Name = S3_1-00
Name = S3_Object
Address = "Replace this by the Bareos Storage Daemon FQDN or IP address"
Password = "Replace this by the Bareos Storage Daemon director password"
Device = S3_1-00
Media Type = S3_File_1
Device = S3_ObjectStorage
Media Type = S3_Object1
}


Expand Down
Expand Up @@ -2,26 +2,35 @@ Device {
Name = S3_ObjectStorage
Media Type = S3_Object1
Archive Device = S3 Object Storage

#
# Config options:
# profile= - Droplet profile to use either absolute PATH or logical name (e.g. ~/.droplet/<profile>.profile
# location= - AWS location (e.g. us-east etc.)
# Device Options:
# profile= - Droplet profile path, e.g. /etc/bareos/bareos-sd.d/droplet/droplet.profile
# location= - AWS location (e.g. us-east etc.). Optional.
# acl= - Canned ACL
# storageclass= - Storage Class to use.
# bucket= - Bucket to store objects in.
# chunksize= - Size of Volume Chunks (default = 10 Mb)
# iothreads= - Number of IO-threads to use for uploads (use blocking uploads if not set.)
# ioslots= - Number of IO-slots per IO-thread (default 10)
# iothreads= - Number of IO-threads to use for upload (use blocking uploads if not defined)
# ioslots= - Number of IO-slots per IO-thread (0-255, default 10)
# retries= - Number of retires if a write fails (0-255, default = 0, which means unlimited retries)
# mmap - Use mmap to allocate Chunk memory instead of malloc().
#
Device Options = "profile=/etc/bareos/bareos-sd.d/device/droplet/droplet.profile,bucket=bareos,iothreads=2"

# testing:
Device Options = "profile=/etc/bareos/bareos-sd.d/droplet/droplet.profile,bucket=bareos-bucket,chunksize=100M,iothreads=0,retries=1"

# performance:
#Device Options = "profile=/etc/bareos/bareos-sd.d/droplet/droplet.profile,bucket=bareos-bucket,chunksize=100M"

Device Type = droplet
LabelMedia = yes # lets Bareos label unlabeled media
Random Access = yes
AutomaticMount = yes # when device opened, read it
RemovableMedia = no
AlwaysOpen = no
Description = "S3 Object device. A connecting Director must have the same Name and MediaType."
Maximum File Size = 200000000 # 200 MB (Allows for seeking to small portions of the Volume)
Description = "S3 device"
Maximum File Size = 500M # 500 MB (allows for seeking to small portions of the Volume)
Maximum Concurrent Jobs = 1
Maximum Spool Size = 15000M
}

0 comments on commit b29bd50

Please sign in to comment.