create the host directory on first run
[rsync_backup.git] / make_snapshot.sh
blob697a6b52a42f378a16982bc4ab3df184173acc3b
1 #!/bin/sh
3 . /etc/conf.d/backup
5 . $BINDIR/backup_lock.sh
7 # make sure the destination directory exists
8 ${REMOTE_MKDIR} -p ${DST}
10 #LINKDEST="--link-dest ../hourly.1"
11 TIMES=3
14 # do the backup itself (run a few times, since failing here kills the chain)
15 for i in `seq 1 $TIMES`; do
16 ${RSYNC} ${RSYNCOPTS} --filter="merge $RULES" ${LINKDEST} ${SRC} ${REMOTE}:${DST}/hourly.0
17 done
18 ${REMOTE_TOUCH} $DST/hourly.0
20 . $BINDIR/backup_unlock.sh