Allow specifying an alternate region for db2fog backups

This commit is contained in:
Matt-Yorkley
2020-01-07 12:29:42 +01:00
parent f4f05922ae
commit e06449aee3

View File

@@ -8,4 +8,8 @@ DB2Fog.config = {
:provider => 'AWS'
}
DB2Fog.config[:region] = ENV['S3_REGION'] if ENV['S3_REGION']
region = ENV['S3_BACKUPS_REGION'] || ENV['S3_REGION']
# If no region is defined we leave this config key undefined (instead of nil),
# so that db2fog correctly applies it's default
DB2Fog.config[:region] = region if region