diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2014-07-24 16:46:33 +0000 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2014-07-24 16:46:33 +0000 |
commit | 56308755c59d8cde87526016bbdec885627e2169 (patch) | |
tree | 6642b60a740e47ebb284a27104cb84c9e4709570 /gitlab-server/usr/share/gitlab-install/backup-gitlab | |
parent | 53e48f5777aa0575c0d0935d9211d49455594cec (diff) | |
parent | c661f1349f44120b3cfcfc718ebb44b72f299cb8 (diff) | |
download | definitions-56308755c59d8cde87526016bbdec885627e2169.tar.gz |
Merge remote-tracking branch 'origin/baserock/liw/gitlab-repoless-backups'
Reviewed-by: Richard Maw
Reviewed-by: Adam Coldrick
Diffstat (limited to 'gitlab-server/usr/share/gitlab-install/backup-gitlab')
-rw-r--r-- | gitlab-server/usr/share/gitlab-install/backup-gitlab | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/gitlab-server/usr/share/gitlab-install/backup-gitlab b/gitlab-server/usr/share/gitlab-install/backup-gitlab index a6c3e3f5..1320df81 100644 --- a/gitlab-server/usr/share/gitlab-install/backup-gitlab +++ b/gitlab-server/usr/share/gitlab-install/backup-gitlab @@ -4,19 +4,13 @@ # /home/git/gitlab-backup.tar . A separate backup host will need to # back that up. # -# This script be run as the git user on a GitLab host. +# This script be run as the postgres user on a Baserock GitLab host. set -e export PATH=/usr/local/bin:/usr/bin:/bin -cd /home/git/gitlab -mkdir -p /home/git/gitlab/tmp/backups -bundle exec rake gitlab:backup:create RAILS_ENV=production - -ls /home/git/gitlab/tmp/backups/[0-9]*.tar | -tail -n1 | -while read filename -do - mv "$filename" /home/git/gitlab-backup.tar -done +mkdir -p /home/postgres/dumps +cd /home/postgres/dumps +pg_dumpall > new.dump +mv new.dump gitlab.pg_dumpall |