Commit abc8d061 authored by James Fargher's avatar James Fargher

Add configuration for locating gitaly-backup

`gitaly.client_path` has been removed. So we need a specific
configuration for finding gitaly-backup. CNG will likely install the
binary on the container path. So it's useful to search path as a
fallback.

Changelog: added
parent 01aa62ad
...@@ -1116,6 +1116,7 @@ production: &base ...@@ -1116,6 +1116,7 @@ production: &base
## Backup settings ## Backup settings
backup: backup:
path: "tmp/backups" # Relative paths are relative to Rails.root (default: tmp/backups/) path: "tmp/backups" # Relative paths are relative to Rails.root (default: tmp/backups/)
# gitaly_backup_path: # Path of the gitaly-backup binary (default: searches $PATH)
# archive_permissions: 0640 # Permissions for the resulting backup.tar file (default: 0600) # archive_permissions: 0640 # Permissions for the resulting backup.tar file (default: 0600)
# keep_time: 604800 # default: 0 (forever) (in seconds) # keep_time: 604800 # default: 0 (forever) (in seconds)
# pg_schema: public # default: nil, it means that all schemas will be backed up # pg_schema: public # default: nil, it means that all schemas will be backed up
...@@ -1431,6 +1432,7 @@ test: ...@@ -1431,6 +1432,7 @@ test:
secret_file: tmp/gitlab_workhorse_test_secret secret_file: tmp/gitlab_workhorse_test_secret
backup: backup:
path: tmp/tests/backups path: tmp/tests/backups
gitaly_backup_path: tmp/tests/gitaly/_build/bin/gitaly-backup
pseudonymizer: pseudonymizer:
manifest: config/pseudonymizer.yml manifest: config/pseudonymizer.yml
upload: upload:
......
...@@ -793,6 +793,7 @@ Settings.backup['upload']['multipart_chunk_size'] ||= 104857600 ...@@ -793,6 +793,7 @@ Settings.backup['upload']['multipart_chunk_size'] ||= 104857600
Settings.backup['upload']['encryption'] ||= nil Settings.backup['upload']['encryption'] ||= nil
Settings.backup['upload']['encryption_key'] ||= ENV['GITLAB_BACKUP_ENCRYPTION_KEY'] Settings.backup['upload']['encryption_key'] ||= ENV['GITLAB_BACKUP_ENCRYPTION_KEY']
Settings.backup['upload']['storage_class'] ||= nil Settings.backup['upload']['storage_class'] ||= nil
Settings.backup['gitaly_backup_path'] ||= Gitlab::Utils.which('gitaly-backup')
# #
# Pseudonymizer # Pseudonymizer
......
...@@ -61,7 +61,7 @@ module Backup ...@@ -61,7 +61,7 @@ module Backup
end end
def bin_path def bin_path
File.absolute_path(File.join(Gitlab.config.gitaly.client_path, 'gitaly-backup')) File.absolute_path(Gitlab.config.backup.gitaly_backup_path)
end end
end end
end end
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