Provide a mechanism to restore directly from a cloud backup
Problem to solve
There is documentation for storing backups on a cloud provider here: https://docs.gitlab.com/ce/raketasks/backup_restore.html#uploading-backups-to-a-remote-cloud-storage which gives gitlab all of the tools/secrets it needs to manage connecting to remote cloud service and storing the backup.
However, if one needs to restore gitlab from a cloud backup, the administrator is responsible for retrieving that backup from the cloud provider, and putting it into the backups folder locally, which means they need to manage those same secrets somewhere on the local gitlab instance.
It would be nice if the restore functionality was able to re-use the credentials provided for saving the backups, to also retrieve the backups from the cloud provider to initiate a restore.
Target audience
Gitlab system administrators/maintainers.
Further details
Proposal
Add an additional argument to gitlab-rake gitlab:backup:restore BACKUP=1493107454_2018_04_25_10.6.4-ce
like DIRECTORY=remote
to retrieve the backup from whatever is configured for gitlab_rails['backup_upload_remote_directory'] = 'my.s3.bucket'
What does success look like, and how can we measure that?
A sysadmin can restore from a remote backup without having to retrieve it first.
Links / references
An older issue attempted to use an s3:// url to restore, but it failed: https://gitlab.com/gitlab-org/gitlab-ce/issues/39437