diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2014-09-29 17:02:39 +0400 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2014-09-29 17:03:08 +0400 |
commit | e1f6fa6f18afa8461cd82a56250222c2972c7785 (patch) | |
tree | 0ab90fe685c4054f8752dd7c5b196a39b9fa8d42 /config | |
parent | 0e8e9e5d77478294288d34474e580916418ddd91 (diff) |
Add backup upload support to the rake task
Diffstat (limited to 'config')
-rw-r--r-- | config/gitlab.yml.example | 8 | ||||
-rw-r--r-- | config/initializers/1_settings.rb | 5 |
2 files changed, 13 insertions, 0 deletions
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example index 3092ebf3450..ad1db4b4f43 100644 --- a/config/gitlab.yml.example +++ b/config/gitlab.yml.example @@ -212,6 +212,14 @@ production: &base backup: path: "tmp/backups" # Relative paths are relative to Rails.root (default: tmp/backups/) # keep_time: 604800 # default: 0 (forever) (in seconds) + # upload: + # # Fog storage connection settings, see http://fog.io/storage/ . + # connection: + # provider: AWS + # aws_access_key_id: AKIAKIAKI + # aws_secret_access_key: 'secret123' + # # The remote 'directory' to store your backups. For S3, this would be the bucket name. + # remote_directory: 'my.s3.bucket' ## GitLab Shell settings gitlab_shell: diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb index 5b7e69fbc6a..caf4ef25cdd 100644 --- a/config/initializers/1_settings.rb +++ b/config/initializers/1_settings.rb @@ -129,6 +129,11 @@ Settings.gitlab_shell['ssh_path_prefix'] ||= Settings.send(:build_gitlab_shell_s Settings['backup'] ||= Settingslogic.new({}) Settings.backup['keep_time'] ||= 0 Settings.backup['path'] = File.expand_path(Settings.backup['path'] || "tmp/backups/", Rails.root) +Settings.backup['upload'] ||= Settingslogic.new({'remote_directory' => nil, 'connection' => nil}) +# Convert upload connection settings to use symbol keys, to make Fog happy +if Settings.backup['upload']['connection'] + Settings.backup['upload']['connection'] = Hash[Settings.backup['upload']['connection'].map { |k, v| [k.to_sym, v] }] +end # # Git |