From: Carl N Baldwin Date: Mon, 17 Oct 2005 17:55:24 +0000 (-0600) Subject: Hashed out how to call rsync with list of files, links and directories X-Git-Tag: release-0.4~102^2 X-Git-Url: http://git.pippins.net/embedvideo/.git/%27%20%20%20%20.%20%24GLOBALS%5B%27phpgw%27%5D-%3Elink%28%27inc/jquery/%7Blink_activity%7D?a=commitdiff_plain;h=202ae0123998b63a4785b5e5b9f127bf5f7c2f25;p=backups%2F.git Hashed out how to call rsync with list of files, links and directories --- diff --git a/rsync-cmd.sh b/rsync-cmd.sh new file mode 100755 index 0000000..2ee3682 --- /dev/null +++ b/rsync-cmd.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +# This file just has some ideas about how to do the rsync command with the list +# of file produced by lsbackups + +# -H ? -W ? +rsync_opts='-W -H -l -p -t -g -o -0 --files-from=-' + +other_opts='--stats --progress' + +# This would something like be /home +srcdir=~/test/a + +# This would be something like /mnt/dvdisoimage +dstdir=~/destdir + +# # For directories ( Do I even need this? I don't think so. ) +# find $srcdir -type d -print0 | # this just produces an example null-delimited list. +# rsync -d $rsync_opts $other_opts / $dstdir + +# Should also include directories in there +find $srcdir \( -type f -o -type l -o -type d \) -print0 | # this just produces an example null-delimited list. + rsync $rsync_opts $other_opts / $dstdir +