snaprep

git mirror of https://ccx.te2000.cz/bzr/snaprep
git clone https://ccx.te2000.cz/git/snaprep
Log | Files | Refs

commit 1c4cb050749b11bad42113cfdbaab09c290a10e6
parent 3ec8308c84a5122349a7fb21f55167ca9a0b9b3a
Author: Jan Pobrislo <ccx@webprojekty.cz>
Date:   Sat,  2 Nov 2013 00:01:04 +0100

experimenting with rsync daemon mode over shell command
Diffstat:
Anoise | 6++++++
Arsyncd.conf | 15+++++++++++++++
Asnap.shell | 12++++++++++++
Msnaprep | 2+-
4 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/noise b/noise @@ -0,0 +1,6 @@ +#!/bin/zsh +mkdir -p /tmp/noise-$UID +OUT=/tmp/noise-$UID/$$ +filan -o$OUT +print -lr - "$@" '__________________' >>$OUT +cat >>$OUT diff --git a/rsyncd.conf b/rsyncd.conf @@ -0,0 +1,15 @@ +# /etc/rsyncd.conf + +# Minimal configuration file for rsync daemon +# See rsync(1) and rsyncd.conf(5) man pages for help + +# This line is required by the /etc/init.d/rsyncd script +#pid file = /var/run/rsyncd.pid +use chroot = no +read only = yes + +# Simple example for enabling your own local rsync server +[gentoo-portage] + path = /usr/portage + comment = Gentoo Portage tree + exclude = /distfiles /packages diff --git a/snap.shell b/snap.shell @@ -0,0 +1,12 @@ +#!/bin/sh +# only when used locally +if test "$1" != rsync; then + shift +fi + +if test "$1" != rsync; then + echo >&2 'invalid argument' + exit 1 +fi + +exec rsync --server --daemon --log-file=/dev/stderr . diff --git a/snaprep b/snaprep @@ -8,7 +8,7 @@ remote="${2%%:*}" remote_basedir="${2#*:}" rsync_list() { - rsync --list-only --dirs "$@" | sed 's/^.......................................... //' + rsync --list-only --dirs --8-bit-output "$@" | sed 's/^.......................................... //' } remote_snaps="$(rsync_list)"