Hello all, We're using rsync to move files from a server to a client (an embedded device, connected over GPRS) using a cron script on the client. To accomplish this, we use the --delete-source-files option. As I found in the archives, this doesn't remove any folders. Is there a way to have rsync remove the folders as well? As all data flows over the internet, we encrypt it using an SSH tunnel. This tunnel is setup once, and then reused for several rsync sessions, like this: rsync --port <forwarded local port> localhost::share/* /tmp/source/ That rules out any --rsync-path= trickery, right? The reason we'd like to reuse the SSH tunnel is that we need a tunnel anyway for other tools, and SSH-authentication is rather slow (it takes about 10 seconds). This make something like "rsync -e 'ssh user@remotehost'" even slower. The client is using rsync 3.0.4 on a custom Linux kernel and ARM platform. The server uses rsync 2.6.9 (but could be upgraded if required) on a stock x86 Linux kernel. Thanks, Jeroen van der Vegt System designer ________________________________ Technolution B.V. Telephone: +31(0)182 59 40 00 Fax: +31(0)182 53 97 36 E-mail: Jeroen.van.der.Vegt@technolution.eu Visit us at: www.technolution.eu Mailing address: P.O. Box 2013 - 2800 BD Gouda - The Netherlands Address: Zuidelijk Halfrond 1 - 2801 DD Gouda - The Netherlands ________________________________ This e-mail is intended exclusively for the addressee(s), and may not be passed on to, or made available for use by any person other than the addressee(s). Technolution B.V. rules out any and every liability resulting from any electronic transmission.
On Wed, 2008-11-26 at 18:33 +0100, Jeroen van der Vegt wrote:> We're using rsync to move files from a server to a client (an embedded > device, connected over GPRS) using a cron script on the client. To > accomplish this, we use the --delete-source-files option. As I found in the > archives, this doesn't remove any folders. Is there a way to have rsync > remove the folders as well?Not currently. You can join this enhancement request: https://bugzilla.samba.org/show_bug.cgi?id=3845> As all data flows over the internet, we encrypt it using an SSH tunnel. This > tunnel is setup once, and then reused for several rsync sessions, like this: > > rsync --port <forwarded local port> localhost::share/* /tmp/source/ > > That rules out any --rsync-path= trickery, right?Yes, but the daemon "post-xfer exec" parameter gives you essentially the same functionality.> The reason we'd like to reuse the SSH tunnel is that we need a tunnel anyway > for other tools, and SSH-authentication is rather slow (it takes about 10 > seconds). This make something like "rsync -e 'ssh user@remotehost'" even > slower.It may help to use ssh's ControlMaster feature, which lets an ssh command piggyback on an existing ssh connection to the same user@remotehost without re-authenticating. That way, as long as you leave the port-forwarding ssh (or any other ssh) running, further "ssh user@remotehost" commands will be faster. Matt