Skip to content
Snippets Groups Projects
Commit 98d0b651 authored by Jacob Vosmaer's avatar Jacob Vosmaer
Browse files

Add 'rake backup:show_secrets' task for exporting

parent 70c161a4
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment