Support custom directory in gitlab:backup:create task
What does this MR do?
Adds a DIRECTORY
environment variable which can be passed to the gitlab:backup:create
rake task, in order to allow grouping backups into e.g. daily/weekly/monthly folders.
This development is sponsored by Siemens (/cc @bufferoverflow)
Are there points in the code the reviewer needs to double check?
This would also make sense to have as a configuration variable in gitlab.rb
, but for our use case we don't need it.
I only tested it with S3 and local storage, and assume Fog supports the same approach (path in the key) for other providers.
Why was this MR needed?
Currently backups are always uploaded to the root folder, which makes it difficult to e.g. set up retention policies on S3.
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
https://gitlab.com/gitlab-org/gitlab-ce/issues/1391
https://gitlab.com/gitlab-org/gitlab-ce/issues/23221
Edited by Markus Koller