Commit b826c9ff authored by Robert Speicher's avatar Robert Speicher

Create the specified remote directory during backup

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

Closes #12710
parent e87149a1
......@@ -48,7 +48,7 @@ module Backup
end
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,
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