From owner-freebsd-questions@FreeBSD.ORG Thu Feb 10 21:18:48 2005 Return-Path: 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 C160916A4D3 for ; Thu, 10 Feb 2005 21:18:48 +0000 (GMT) Received: from top.daemonsecurity.com (FW-182-254.go.retevision.es [62.174.254.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A99B43D1D for ; Thu, 10 Feb 2005 21:18:48 +0000 (GMT) (envelope-from norgaard@locolomo.org) Received: from [192.168.0.32] (charm.daemonsecurity.com [192.168.0.32]) by top.daemonsecurity.com (Postfix) with ESMTP id 90FD2FD01F; Thu, 10 Feb 2005 22:18:46 +0100 (CET) Message-ID: <420BCFB4.9010803@locolomo.org> Date: Thu, 10 Feb 2005 22:18:44 +0100 From: Erik Norgaard User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050127 X-Accept-Language: en, en-us, da, it, es MIME-Version: 1.0 To: Gregor Mosheh References: <20050210203804.78804.qmail@web53802.mail.yahoo.com> In-Reply-To: <20050210203804.78804.qmail@web53802.mail.yahoo.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: Secure file transfers X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Feb 2005 21:18:48 -0000 Gregor Mosheh wrote: > I had a similar, perhaps related question. I'm making > backups via tar to a SMB server, but I would rather > use sftp/scp for it (the NAS supports both SMB and > scp/sftp). > > I don't have enough disk space to make the backup to a > tarchive and then scp that tarchive. Is there a way to > make scp/sftp read from a pipe or stdin, rather than > specific filenames? The docs haven't mentioned it, but > since the subject came up I thought it worth asking... You can tunnel rsync through ssh, this way you only transfer changes, you transfer changes in a secure fassion, and you don't need diskspace to create a backup file that is then transfered, I use: /usr/local/bin/rsync -Cuvaz --rsh="ssh" /path/to/src/ \ @:/path/to/dst The only, but really anoying, problem about rsync is that /path/to/src/ is not treated as /path/to/src - the above does what you expect: mirror all in src to dst. So, while you try figuring out the /'s rsync to an empty dir, then you can easily delete. Cheers, Erik -- Ph: +34.666334818 web: http://www.locolomo.org S/MIME Certificate: http://www.locolomo.org/crt/2004071206.crt Subject ID: A9:76:7A:ED:06:95:2B:8D:48:97:CE:F2:3F:42:C8:F2:22:DE:4C:B9 Fingerprint: 4A:E8:63:38:46:F6:9A:5D:B4:DC:29:41:3F:62:D3:0A:73:25:67:C2