Skip to content
Snippets Groups Projects
Commit 05ca3456 authored by Josh Frye's avatar Josh Frye
Browse files

Allow backup directory creation on cloud storage. Closes #18749

parent faee4763
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment