mys3ql 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +3 -0
- data/lib/mys3ql/config.rb +4 -0
- data/lib/mys3ql/s3.rb +3 -2
- data/lib/mys3ql/version.rb +1 -1
- metadata +3 -3
data/README.md
CHANGED
@@ -52,6 +52,9 @@ Second, create your config file:
|
|
52
52
|
secret_access_key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
53
53
|
# Bucket in which to store your backups
|
54
54
|
bucket: db_backups
|
55
|
+
# AWS region your bucket lives in.
|
56
|
+
# (I suspect you only need to specify this when your 'location' is in a different region.)
|
57
|
+
#region: eu-west-1
|
55
58
|
|
56
59
|
If you only have one database to back up on your server, you can put the config file at `~/.mys3ql`. Otherwise, tell the `mys3ql` command where the config file is with the `--config=FILE` switch.
|
57
60
|
|
data/lib/mys3ql/config.rb
CHANGED
data/lib/mys3ql/s3.rb
CHANGED
@@ -75,7 +75,8 @@ module Mys3ql
|
|
75
75
|
s = Fog::Storage.new(
|
76
76
|
:provider => 'AWS',
|
77
77
|
:aws_secret_access_key => @config.secret_access_key,
|
78
|
-
:aws_access_key_id => @config.access_key_id
|
78
|
+
:aws_access_key_id => @config.access_key_id,
|
79
|
+
:region => @config.region
|
79
80
|
)
|
80
81
|
log 's3: connected'
|
81
82
|
s
|
@@ -85,7 +86,7 @@ module Mys3ql
|
|
85
86
|
def bucket
|
86
87
|
@directory ||= begin
|
87
88
|
d = s3.directories.get @config.bucket
|
88
|
-
raise "S3 bucket #{@config.bucket} not found" unless d # create bucket instead?
|
89
|
+
raise "S3 bucket #{@config.bucket} not found" unless d # create bucket instead (n.b. region/location)?
|
89
90
|
log "s3: opened bucket #{@config.bucket}"
|
90
91
|
d
|
91
92
|
end
|
data/lib/mys3ql/version.rb
CHANGED
metadata
CHANGED