Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/astrails/safe/config/builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def collection(*names)
end

simple_value :verbose, :dry_run, :local_only, :path, :command,
:options, :user, :host, :port, :password, :key, :secret, :bucket,
:options, :user, :host, :port, :password, :key, :secret, :bucket, :endpoint,
:api_key, :container, :socket, :service_net, :repo_path
multi_value :skip_tables, :exclude, :files
hash_value :mysqldump, :tar, :gpg, :keep, :pgdump, :tar, :svndump,
Expand Down
6 changes: 5 additions & 1 deletion lib/astrails/safe/s3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def save
raise RuntimeError, "pipe-streaming not supported for S3." unless @backup.path

# needed in cleanup even on dry run
AWS::S3::Base.establish_connection!(:access_key_id => key, :secret_access_key => secret, :use_ssl => true) unless local_only?
AWS::S3::Base.establish_connection!(:access_key_id => key, :secret_access_key => secret, :s3_endpoint => endpoint, :use_ssl => true) unless local_only?

puts "Uploading #{bucket}:#{full_path}" if verbose? || dry_run?
unless dry_run? || local_only?
Expand Down Expand Up @@ -64,6 +64,10 @@ def key
config[:s3, :key]
end

def endpoint
config[:s3, :endpoint]
end

def secret
config[:s3, :secret]
end
Expand Down