Current location

narf Source control manager Git

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshtrom <shtrom@1991c358-8f32-0410-a49a-990740bdf4c2>2012-02-07 05:13:29 +0000
committershtrom <shtrom@1991c358-8f32-0410-a49a-990740bdf4c2>2012-02-07 05:13:29 +0000
commite5efd5134974e08b9bb492604da80d3052517fcd (patch)
tree7af53e4bc395257be5f30d3d045679d72161fdec /openbsd
parent79ffcba38904ec10a47d90c1756ee46f79e165e9 (diff)
[OpenBSD scripts] Specify TMP dir in rdiff-backup
git-svn-id: svn+ssh://scm.narf.ssji.net/svn/shtrom/scripts@1074 1991c358-8f32-0410-a49a-990740bdf4c2
Diffstat (limited to 'openbsd')
-rwxr-xr-xopenbsd/backup.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/openbsd/backup.sh b/openbsd/backup.sh
index 4d33d66..519661d 100755
--- a/openbsd/backup.sh
+++ b/openbsd/backup.sh
@@ -4,12 +4,14 @@ DIRS="/etc /srv /home/shtrom"
BACKUPROOT="/srv/rdiff-backup"
BACKUPDIR="${BACKUPROOT}/`hostname -s`"
BACKUPSERVER=backup.narf.ssji.net
-REMOTEBACKUPDIR="`hostname -s`@${BACKUPSERVER}::${BACKUPDIR}"
+#REMOTEBACKUPDIR="`hostname -s`@${BACKUPSERVER}::${BACKUPDIR}"
+REMOTEBACKUPDIR="`hostname -s`@${BACKUPSERVER}::/share/homes/`hostname -s`"
EXCLUDEALWAYS="${BACKUPROOT} /srv/backup/ /srv/www/sites/offlines.fr/"
+TMPSUBDIR=/tmp
if [ "$1" = "remote" ]; then
EFFECTIVEBACKUPDIR=${REMOTEBACKUPDIR}
- REMOTESCHEMA="ssh -qT -i /etc/ssh/ssh_host_rsa_key %s"
+ REMOTESCHEMA="ssh -qCT -i /etc/ssh/ssh_host_rsa_key %s"
else
EFFECTIVEBACKUPDIR=${BACKUPDIR}
REMOTESCHEMA=""
@@ -24,6 +26,6 @@ for DIR in ${DIRS}; do
EXCLS="${EXCLS} --exclude ${EXCL}"
fi
done
- /usr/local/bin/rdiff-backup --create-full-path ${REMOTESCHEMA:+--remote-schema "${REMOTESCHEMA}"} ${EXCLS} ${DIR} ${EFFECTIVEBACKUPDIR}${DIR}
+ /usr/local/bin/rdiff-backup --create-full-path ${REMOTESCHEMA:+--remote-schema "${REMOTESCHEMA}"} ${TMPSUBDIR:+--tempdir ${BACKUPDIR}${TMPSUBDIR}} ${TMPSUBDIRxxxDISABLED:+--remote-tempdir /share/homes/`hostname -s`${TMPSUBDIR}} ${EXCLS} ${DIR} ${EFFECTIVEBACKUPDIR}${DIR}
done
echo "."