#!/bin/sh # # Run the gitlab backup script. The backup will be stored as # /home/git/gitlab-backup.tar . A separate backup host will need to # back that up. # # This script be run as the postgres user on a Baserock GitLab host. set -e export PATH=/usr/local/bin:/usr/bin:/bin mkdir -p /home/postgres/dumps cd /home/postgres/dumps pg_dumpall > new.dump mv new.dump gitlab.pg_dumpall