From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Iokgk-0004v8-NM for garchives@archives.gentoo.org; Sun, 04 Nov 2007 18:59:15 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.1/8.14.0) with SMTP id lA4IvvYp014534; Sun, 4 Nov 2007 18:57:57 GMT Received: from fitzgerald.ucs.mun.ca (mx5.mun.ca [134.153.232.57]) by robin.gentoo.org (8.14.1/8.14.0) with ESMTP id lA4IoZ4C004628 for ; Sun, 4 Nov 2007 18:50:36 GMT Received: from minnie.esd.mun.ca (minnie.esd.mun.ca [134.153.36.8]) by fitzgerald.ucs.mun.ca (8.13.1/8.13.1) with ESMTP id lA4IoXbv010911 for ; Sun, 4 Nov 2007 15:20:33 -0330 Received: from minnie.esd.mun.ca (minnie.esd.mun.ca [134.153.36.8]) by minnie.esd.mun.ca (8.14.0/8.13.3) with ESMTP id lA4IoXaO000424 for ; Sun, 4 Nov 2007 15:20:33 -0330 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] rsync via ssh References: <589486.43504.qm@web83109.mail.mud.yahoo.com> <472E0BE7.90903@gmail.com> From: Roger Mason Date: Sun, 04 Nov 2007 15:20:33 -0330 In-Reply-To: <472E0BE7.90903@gmail.com> (Ralph Slooten's message of "Mon\, 05 Nov 2007 07\:13\:59 +1300") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.001005 (2006-08-29) X-Spam-Status: No, hits=-11.4 required=5.0 tests=ALL_TRUSTED,USER_IN_WHITELIST version=3.1.5 X-Spam-Report: -10 USER_IN_WHITELIST From: address is in the user's white-list * -1.4 ALL_TRUSTED Passed through trusted hosts only via SMTP X-Scanned-By: MIMEDefang 2.57 on 134.153.232.57 X-Archives-Salt: 45ddc159-e22d-4838-9d98-c10fcee3e4e1 X-Archives-Hash: f0db0d32915a300fd455cecb875b3728 Hi Ralph, Ralph Slooten writes: > I have done a similar thing at work, except what I do is first create > an ssh tunnel, then rsync to the locally listening port. Works > perfectly. In my setup the remote server is running an SSH server > which is not accessible directly. Maybe this will help you. > > > #!/bin/bash > SSL_COMMAND="ssh -p 2222 sshuser@myserver -f -N -L 8000:localhost:873" > SSL_PID=`ps aux | grep "$SSL_COMMAND" | egrep -v 'grep' | awk '{print $2}'` > > if [ "$SSL_PID" == "" ]; then > echo "=> Creating SSH tunnel to myserver" > $SSL_COMMAND > SSL_PID=`ps aux | grep "$SSL_COMMAND" | egrep -v 'grep' | awk > {print $2}'` > else > echo "=> SSH tunnel already exists. Using existing tunnel." > fi > > if [ "$SSL_PID" != "" ]; then > echo "=> Connecting through SSH tunnel with PID $SSL_PID" > rsync rsync://localhost:8000/wwwroot > /mnt/samba/hotcopy/myserver/wwwroot \ > -rvtzp --delete --modify-window=1 > > echo "=> Closing SSH tunnel" > kill $SSL_PID > else > echo "ERROR: SSH Connection failed! The backup could not complete" > fi Another responder suggested rdiff-backup. I'll give that a try first. Thanks, Roger -- gentoo-user@gentoo.org mailing list