=== removed file 'post' --- post 2014-02-14 17:52:02 +0000 +++ post 1970-01-01 00:00:00 +0000 @@ -1,21 +0,0 @@ -#!/bin/zsh -exec 1>&2 -env | grep RSYNC - -# for n in $(seq 5); do -# print $n... -# sleep 1 -# done -# print 'Done!' - -set -x - -[[ $RSYNC_MODULE_NAME != 'snaprep_new' ]] && exit 0 - -marks=( $RSYNC_MODULE_PATH/.snapshot.[1-9]*(N) ) -if (($#marks)); then - mark=$marks[1] - dst=${RSYNC_MODULE_PATH:h}/${mark##*.snapshot.} - [[ -e $dst ]] && exit 1 - mv -v $RSYNC_MODULE_PATH $dst -fi === removed file 'pre' --- pre 2014-02-14 17:52:02 +0000 +++ pre 1970-01-01 00:00:00 +0000 @@ -1,16 +0,0 @@ -#!/bin/zsh -env | grep RSYNC 1>&2 -set -x -mkdir -p /tmp/snaprep || exit $? - -[[ $RSYNC_MODULE_NAME != 'snaprep_new' ]] && exit 0 - -if ! [[ -d $RSYNC_MODULE_PATH ]]; then - snapshots=( ${RSYNC_MODULE_PATH:h}/[1-9]*(N) ) - if (($#snapshots)); then - src=$snapshots[-1] - rsync -a --exclude=/.snapshot.\* --link-dest=$src $src/ $RSYNC_MODULE_PATH/ || exit $? - else - mkdir -p $RSYNC_MODULE_PATH/ || exit $? - fi -fi === modified file 'rsyncd.conf' --- rsyncd.conf 2014-02-14 17:52:02 +0000 +++ rsyncd.conf 2013-11-01 23:01:04 +0000 @@ -7,23 +7,9 @@ #pid file = /var/run/rsyncd.pid use chroot = no read only = yes -transfer logging = yes -max verbosity = 2 - -pre-xfer exec = /home/ccx/bzr/snaprep/pre -post-xfer exec = /home/ccx/bzr/snaprep/post # Simple example for enabling your own local rsync server [gentoo-portage] path = /usr/portage comment = Gentoo Portage tree exclude = /distfiles /packages - -[snaprep] - path = /tmp/snaprep - read only = yes - -[snaprep_new] - path = /tmp/snaprep/new - read only = no - refuse options = inplace