Read about our upcoming Code of Conduct on this issue

Commit e75290c8 authored by Ash McKenzie's avatar Ash McKenzie
Browse files

Merge branch 'cat-add-backup-object-storage-option' into 'main'

Add backup object storage config & docs

See merge request gitlab-org/gitlab-development-kit!2219
......@@ -26,6 +26,16 @@ The object store has the following default settings:
Changing settings requires `gdk reconfigure` to be run.
## Backups
To set the object storage config for backups, configure the bucket in `object_store.backup_remote_directory`, for example:
```yaml
object_store:
enabled: false
backup_remote_directory: 'backups'
```
## MinIO errors
If you cannot start MinIO, you may have an old version not supporting the `--compat` parameter.
......
......@@ -159,6 +159,7 @@ nginx:
certificate: localhost.crt
key: localhost.key
object_store:
backup_remote_directory: ''
connection:
provider: AWS
aws_access_key_id: minio
......
......@@ -275,6 +275,7 @@ module GDK
bool(:enabled) { read!('object_store_enabled') || false }
string(:host) { config.listen_address }
integer(:port) { read!('object_store_port') || 9000 }
string(:backup_remote_directory) { '' }
hash_setting(:connection) do
{
'provider' => 'AWS',
......
......@@ -1452,6 +1452,12 @@ RSpec.describe GDK::Config do
end
end
end
describe '#backup_remote_directory' do
it 'is empty by default' do
expect(config.object_store.backup_remote_directory).to eq('')
end
end
end
describe 'omniauth' do
......
......@@ -787,6 +787,10 @@ production: &base
backup:
path: "tmp/backups" # Relative paths are relative to Rails.root (default: tmp/backups/)
gitaly_backup_path: <%= config.gitaly.__build_bin_backup_path %> # Path of the gitaly-backup binary (default: searches $PATH)
<%- if config.object_store.enabled? && !config.object_store.backup_remote_directory.empty? -%>
connection: <%= config.object_store.connection.to_json %>
remote_directory: <%= config.object_store.backup_remote_directory %>
<%- end -%>
# archive_permissions: 0640 # Permissions for the resulting backup.tar file (default: 0600)
# keep_time: 604800 # default: 0 (forever) (in seconds)
# pg_schema: public # default: nil, it means that all schemas will be backed up
......
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