Skip to content
Snippets Groups Projects
Commit b826c9ff authored by Robert Speicher's avatar Robert Speicher
Browse files

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
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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,
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