#!/usr/local/bin/bash
#/ Usage: ghe-backup-repositories-tarball
#/ Take a tarball snapshot of all Git repository data.
#/
#/ Note: This script typically isn't called directly. It's invoked by the
#/ ghe-backup command when the tarball strategy is used.
set -e

# Bring in the backup configuration
. $( dirname "${BASH_SOURCE[0]}" )/ghe-backup-config

bm_start "$(basename $0)"

# Snapshot all Git repository data
ghe-ssh "$GHE_HOSTNAME" -- 'ghe-export-repositories' > "$GHE_SNAPSHOT_DIR"/repositories.tar

bm_end "$(basename $0)"
