Commit 873718aa authored by Stan Hu's avatar Stan Hu

Merge branch 'rs-create-remote-backup-folder' into 'master'

Create the specified remote directory during backup

This is idempotent, so there's no harm calling it if the directory
already exists.

Closes #12710

See merge request !4383
parents 4ec1b65b b826c9ff
...@@ -48,7 +48,7 @@ module Backup ...@@ -48,7 +48,7 @@ module Backup
end end
connection = ::Fog::Storage.new(connection_settings) connection = ::Fog::Storage.new(connection_settings)
directory = connection.directories.get(remote_directory) directory = connection.directories.create(key: remote_directory)
if directory.files.create(key: tar_file, body: File.open(tar_file), public: false, if directory.files.create(key: tar_file, body: File.open(tar_file), public: false,
multipart_chunk_size: Gitlab.config.backup.upload.multipart_chunk_size, multipart_chunk_size: Gitlab.config.backup.upload.multipart_chunk_size,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment