From b826c9ff17b701344028832d523522a3cb925a23 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Tue, 31 May 2016 13:29:37 -0400 Subject: [PATCH] Create the specified remote directory during backup This is idempotent, so there's no harm calling it if the directory already exists. Closes #12710 --- lib/backup/manager.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/backup/manager.rb b/lib/backup/manager.rb index 3e07096e6cc..660ca8c2923 100644 --- a/lib/backup/manager.rb +++ b/lib/backup/manager.rb @@ -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,