summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2015-09-22 10:46:51 +0200
committerJacob Vosmaer <contact@jacobvosmaer.nl>2015-09-22 10:46:51 +0200
commit98d0b651e8f7896a33dd0a1e051cb8e72c0c1ff6 (patch)
treec9c6a07ae28be9f0c2198a67fba69d0c3624e4d1
parent70c161a429de1575071441352b6b44740ad38b96 (diff)
downloadgitlab-ci-98d0b651e8f7896a33dd0a1e051cb8e72c0c1ff6.tar.gz
Add 'rake backup:show_secrets' task for exporting
-rw-r--r--lib/tasks/backup.rake24
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/tasks/backup.rake b/lib/tasks/backup.rake
index facd659..75fcdd1 100644
--- a/lib/tasks/backup.rake
+++ b/lib/tasks/backup.rake
@@ -30,6 +30,30 @@ namespace :backup do
$progress.puts
end
+ desc "GITLAB | Show database secrets"
+ task show_secrets: :environment do
+ configure_cron_mode
+ $progress.puts <<-EOS
+
+If you are moving to a GitLab installation installed from source, replace the
+contents of /home/git/gitlab/config/secrets.yml with the following:
+
+
+---
+production:
+ db_key_base: #{JSON.dump(GitlabCi::Application.secrets.db_key_base)}
+
+
+If your GitLab server uses Omnibus packages, add the following line to
+/etc/gitlab/gitlab.rb:
+
+
+gitlab_rails['db_key_base'] = #{GitlabCi::Application.secrets.db_key_base.inspect}
+
+
+EOS
+ end
+
desc "GITLAB | Restore a previously created backup"
task restore: :environment do
configure_cron_mode