summaryrefslogtreecommitdiff
path: root/gitlab-server/usr/share/gitlab-install/gitlab-remote-backup.sh
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2014-07-24 16:46:33 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2014-07-24 16:46:33 +0000
commit56308755c59d8cde87526016bbdec885627e2169 (patch)
tree6642b60a740e47ebb284a27104cb84c9e4709570 /gitlab-server/usr/share/gitlab-install/gitlab-remote-backup.sh
parent53e48f5777aa0575c0d0935d9211d49455594cec (diff)
parentc661f1349f44120b3cfcfc718ebb44b72f299cb8 (diff)
downloaddefinitions-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/gitlab-remote-backup.sh')
-rw-r--r--gitlab-server/usr/share/gitlab-install/gitlab-remote-backup.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/gitlab-server/usr/share/gitlab-install/gitlab-remote-backup.sh b/gitlab-server/usr/share/gitlab-install/gitlab-remote-backup.sh
new file mode 100644
index 00000000..85618811
--- /dev/null
+++ b/gitlab-server/usr/share/gitlab-install/gitlab-remote-backup.sh
@@ -0,0 +1,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/.
+