Commit 0985ff32 authored by Kirill Smelkov's avatar Kirill Smelkov

Gitlab Backup Changes for gitlab 11.11

@kirr This two commits are required to backup and restore with recent versions of gitlab.

- Skip gitlab page, else gitlab will try to restore it and fail.
- `Backup::Database.new` now require a parameter

/reviewed-on: !7
parents 3f6c4dee 78f5392a
...@@ -88,7 +88,7 @@ need_gitlab_config() { ...@@ -88,7 +88,7 @@ need_gitlab_config() {
s = c.gitlab_shell s = c.gitlab_shell
puts Gitlab::VERSION, c.backup.path, s.repos_path, s.hooks_path puts Gitlab::VERSION, c.backup.path, s.repos_path, s.hooks_path
c = Backup::Database.new.config c = Backup::Database.new($stdout).config
puts c["database"] puts c["database"]
puts c["adapter"], c["username"], c["host"], c["port"], c["password"] puts c["adapter"], c["username"], c["host"], c["port"], c["password"]
...@@ -112,7 +112,7 @@ backup_pull() { ...@@ -112,7 +112,7 @@ backup_pull() {
tmpd=$(mktemp -d `pwd`/gitlab-backup.XXXXXX) tmpd=$(mktemp -d `pwd`/gitlab-backup.XXXXXX)
trap 'rm -rf "$tmpd"' EXIT trap 'rm -rf "$tmpd"' EXIT
gitlab-rake gitlab:backup:create SKIP=repositories,db | tee "$tmpd/gitlab_backup_create.out" gitlab-rake gitlab:backup:create SKIP=repositories,db,pages | tee "$tmpd/gitlab_backup_create.out"
backup_tar=`grep "^Creating backup archive: .* done" "$tmpd/gitlab_backup_create.out"` || \ backup_tar=`grep "^Creating backup archive: .* done" "$tmpd/gitlab_backup_create.out"` || \
die "E: Cannot detect backup tar" die "E: Cannot detect backup tar"
......
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