summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/gitlab.yml.example2
-rw-r--r--config/initializers/1_settings.rb10
2 files changed, 11 insertions, 1 deletions
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
index 473be138950..1818f2c0d01 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
@@ -22,7 +22,7 @@ email:
app:
default_projects_limit: 10
# backup_path: "/vol/backups" # default: Rails.root + backups/
- # backup_keep_time: 7.days # default: 0 (forever)
+ # backup_keep_time: 604800 # default: 0 (forever) (in seconds)
#
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index 8b9ed8aebd6..bbf5976bf74 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -101,5 +101,15 @@ class Settings < Settingslogic
def default_projects_limit
app['default_projects_limit'] || 10
end
+
+ def backup_path
+ t = app['backup_path'] || "backups/"
+ t = /^\//.match(t) ? t : File.join(Rails.root + t)
+ t
+ end
+
+ def backup_keep_time
+ app['backup_keep_time'] || 0
+ end
end
end