summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Frye <joshfng@gmail.com>2016-06-17 08:27:11 -0400
committerJosh Frye <joshfng@gmail.com>2016-06-17 08:27:11 -0400
commit05ca3456274e59a27b69c506dc8f58ba1cf0b61a (patch)
treecbbae23478375a258298039dc753775269e792ac
parentfaee4763f7a166772bb40945f82da4b25a95e7d5 (diff)
downloadgitlab-ce-issue-18749.tar.gz
Allow backup directory creation on cloud storage. Closes #18749issue-18749
-rw-r--r--lib/backup/manager.rb9
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/backup/manager.rb b/lib/backup/manager.rb
index 2ff3e3bdfb0..48b14aa9393 100644
--- a/lib/backup/manager.rb
+++ b/lib/backup/manager.rb
@@ -156,14 +156,7 @@ module Backup
def connect_to_remote_directory(connection_settings)
connection = ::Fog::Storage.new(connection_settings)
- # We only attempt to create the directory for local backups. For AWS
- # and other cloud providers, we cannot guarantee the user will have
- # permission to create the bucket.
- if connection.service == ::Fog::Storage::Local
- connection.directories.create(key: remote_directory)
- else
- connection.directories.get(remote_directory)
- end
+ connection.directories.create(key: remote_directory)
end
def remote_directory