From owner-freebsd-questions@FreeBSD.ORG Sat Oct 28 02:11:11 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5A9EA16A403 for ; Sat, 28 Oct 2006 02:11:11 +0000 (UTC) (envelope-from lars+lister.freebsd@adventuras.no) Received: from mail.adventuras.no (mail.adventuras.no [194.63.250.215]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9321743D46 for ; Sat, 28 Oct 2006 02:11:10 +0000 (GMT) (envelope-from lars+lister.freebsd@adventuras.no) Received: from [84.209.202.7] (hjem [84.209.202.7]) (authenticated bits=0) by mail.adventuras.no (8.12.10/8.12.10) with ESMTP id k9S29hT8030620 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Sat, 28 Oct 2006 04:09:47 +0200 Message-ID: <4542BBE7.6050708@adventuras.no> Date: Sat, 28 Oct 2006 04:09:43 +0200 From: Lars Kristiansen User-Agent: Thunderbird 1.5.0.7 (X11/20060916) MIME-Version: 1.0 To: Gary Kline References: <20061027174512.GA88552@thought.org> In-Reply-To: <20061027174512.GA88552@thought.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Adventuras-MailScanner-Information: Please contact the ISP for more information X-Adventuras: du kan filtrere etter AdvSpamScore over 5-10 X-Adventuras-SpamCheck: not spam, SpamAssassin (score=-4.219, required 6, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.18, BAYES_00 -2.60) X-MailScanner-From: lars+lister.freebsd@adventuras.no X-Spam-Status: No Cc: FreeBSD Mailing List Subject: Re: rsync does not --exclude: (??) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Oct 2006 02:11:11 -0000 Gary Kline skrev: > People, > > Weeks ago I tried this *without* the --exclude flags and > overwrote DOT file that I didn't want to. Iust rechecked this > use of rsync, saving important files from my work server > elseswhere, and see that some files or directories are being > listed and copied over. IDoes anything obvious jump out here? > > gary > > > > # > ## test2ethos.sh > # > > rsync -Cptuvaz -n -e "ssh -i /home/kline/.ssh/tao_XXXYYYZZZ-id" \ > --exclude /home/kline/.zlogin \ > --exclude /home/kline/.zshrc \ > --exclude /home/kline/.zhistory.* \ > --exclude /home/kline/.ctwrm \ > --exclude /home/kline/.mozilla \ > --exclude /home/kline/.evolution \ > --exclude /home/kline/4zip/ \ > --exclude '/home/kline/www/' \ > /home/kline kline@ethos:/home/kline Hope this might help. From man rsync: "global include/exclude patterns are anchored at the "root of the transfer" in man rsync look for: "INCLUDE/EXCLUDE PATTERN RULES" and "ANCHORING INCLUDE/EXCLUDE PATTERNS" Regards, Lars > if [ $? = 0 ] > then > echo "rsync transfer went okay: tao to ethos" > else > echo "rsync failed to ethos from /home/kline"|mail kline@thought.org > fi > >