From owner-freebsd-questions@FreeBSD.ORG Mon Aug 30 17:47:43 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 309601065670 for ; Mon, 30 Aug 2010 17:47:43 +0000 (UTC) (envelope-from kraduk@googlemail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id C9A5B8FC18 for ; Mon, 30 Aug 2010 17:47:42 +0000 (UTC) Received: by qwg5 with SMTP id 5so75606qwg.13 for ; Mon, 30 Aug 2010 10:47:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=91Mckzhpr+/vpStGfOTcqPkuOZjlMfP3oA60Svk8eYA=; b=aL2nz2rgOgzX4C4/l8v7OWtvjWoBjk1XqmJKb+EyFLZ34LNKRjzyYm7voz0sJa4R/q LA+g6nEaJPtAOtmIZtPotx2QsSkeakTP3/AXLHsK1MfT+Pmco+y3rh/byvYeOQtc83Qq HKauY/Jj6ACdEIYz9JBjPYJ4bHiI56XQ3A1as= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=LDuJNuUq9I/ykeEivhqXe505xqFlvOBkCz7Dpa5WBZvtIfwO52GiOtuTChM4nBEDJp XY2d+A3+TZ9R5ph0dSgNfHGFHDIcrnRCROr0JCIFVOVwo0gi1j3eXTD8y+k81dU+3urz KigXizzV9/s5ryU0VMqMIHoGUMI1+lcVy2+Fk= MIME-Version: 1.0 Received: by 10.229.238.197 with SMTP id kt5mr3392279qcb.25.1283190461525; Mon, 30 Aug 2010 10:47:41 -0700 (PDT) Received: by 10.229.189.70 with HTTP; Mon, 30 Aug 2010 10:47:41 -0700 (PDT) In-Reply-To: <20100827181515.GA96499@thought.org> References: <20100827170737.GA96063@thought.org> <4C77F3AC.8020908@gmail.com> <20100827102501.79222db6@eggman> <20100827175141.GB96341@thought.org> <20100827175452.GD53891@eggman.experts-exchange.com> <20100827181515.GA96499@thought.org> Date: Mon, 30 Aug 2010 18:47:41 +0100 Message-ID: From: krad To: Gary Kline Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Jason , FreeBSD Mailing List Subject: Re: how do i scp .dotfiles?? 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: Mon, 30 Aug 2010 17:47:43 -0000 On 27 August 2010 19:15, Gary Kline wrote: > On Fri, Aug 27, 2010 at 10:54:52AM -0700, Jason wrote: > > On Fri, Aug 27, 2010 at 10:51:41AM -0700, Gary Kline thus spake: > > >On Fri, Aug 27, 2010 at 10:25:01AM -0700, Jason Helfman wrote: > > >>On Fri, 27 Aug 2010 13:19:40 -0400 > > >>Glen Barber wrote: > > >> > > >>> On 8/27/10 1:07 PM, Gary Kline wrote: > > >>> > > > >>> > guys, > > >>> > > > >>> > this is the start of my master switchover. how to i copy/scp,say, > > >>> > ~/.purpur to home/kline/.purple? along with many hundreds of other > > >>> > dot files? scp doesn't do it. > > >>> > > > >>> > tx, > > >>> > > > >>> > > >>> scp user@foo:\.dotfile .dotfile > > >>> > > >>> Regards, > > >>> > > >> > > >>Use rsync over ssh. > > >> > > >> > > > > > > > > > i've already done 98 or so straight scp copies. the thing is how > > > to use rsync over to an empty ethic? [[ empty == "there are no \ > > > dot files not .directories"] i want EVERYTHING from this desktop, > > > tao, temp on ethic. > > > > > > thanks > > > > > > > > You can just use rsync in cooperation with find command. > > > > I've used it before, but found this as an example with a web search. > > rsync -avR remote:'`find /home -name "*.[ch]"`' /tmp/ > > > > Just reverse the order. > > > > this may be close. use the unix tools and glue them together:-) > > i have this, cobbled together from a prev script: > > > > echo "rsync with checksum from directory [${PWD}] to > [kline@ethic:${EPWD}]"; > > rsync --perms --times --update --compress --verbose \ > --checksum -e "ssh -i /home/kline/.ssh/tao_nopasswd-id" \ > ${PWD} kline@ethic:${EPWD}; > if [ $? = 0 ] > then > echo "rsync transfer went okay, tao to ethic"|mail > kline@thought.org > else > echo "rsync failed to ethic from /home/kline"|mail > kline@thought.org > fi > > exit; > > but this fails ...... > > any clues?? > > > > -jgh > > _______________________________________________ > > freebsd-questions@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > > To unsubscribe, send any mail to " > freebsd-questions-unsubscribe@freebsd.org" > > -- > Gary Kline kline@thought.org http://www.thought.org Public Service > Unix > The 7.83a release of Jottings: http://jottings.thought.org/index.php > http://journey.thought.org > > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to " > freebsd-questions-unsubscribe@freebsd.org" > rsync is probably trying to chown files to ownerships it cant. The best way I have found to do this and keep things fairly secure it to run an rsync server on the source machine but bind it to loopback. Then tunnel the the server over ssh when you go into the box. This allows things to run relatively safely as root. eg ssh -R 873:127.0.0.1:873 " sudo rsync -aP --numeric-ids 127.0.0.1::HOME/ /home/ " if you just want certain user dirs then add some include and exclude flags eg --include="/home/kline" -- include="/home/kline/**" --exclude="/home/**" ordering is important here.