summaryrefslogtreecommitdiff
path: root/gitlab-server/usr/share/gitlab-install/gitlab-remote-backup.sh
blob: 856188111f07e75c5514265ce81fd2c597679f90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
#
# Copy relevant files of a Baserock Gitlab instance out of the instance.
#
# Usage: backup.sh ADDR
# where ADDR is the address (domain name, IP address) of the instance.
# The files are copied to the current directory.

set -eux

ADDR="$1"

backup()
{
    rsync -ahHS --delete "root@$ADDR:$1" "$2"
}

mkdir -p dumps repositories uploads
backup /home/postgres/dumps/. dumps/.
backup /home/git/repositories/. repositories/.
backup /home/git/gitlab/public/uploads/. uploads/.