From owner-freebsd-questions@freebsd.org Wed Dec 9 00:50:55 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 923759D4DE5 for ; Wed, 9 Dec 2015 00:50:55 +0000 (UTC) (envelope-from info@cisjournal.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 824B51EB6 for ; Wed, 9 Dec 2015 00:50:55 +0000 (UTC) (envelope-from info@cisjournal.org) Received: by mailman.ysv.freebsd.org (Postfix) id 80F1F9D4DE4; Wed, 9 Dec 2015 00:50:55 +0000 (UTC) Delivered-To: questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 682599D4DE3 for ; Wed, 9 Dec 2015 00:50:55 +0000 (UTC) (envelope-from info@cisjournal.org) Received: from dmail-031.servers.eqx.misp.co.uk (dmail-031.servers.eqx.misp.co.uk [185.52.24.204]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3AD841EB5 for ; Wed, 9 Dec 2015 00:50:54 +0000 (UTC) (envelope-from info@cisjournal.org) Received: from [39.41.191.54] (helo=user-PC) by dmail-031.servers.eqx.misp.co.uk with esmtpa (Exim 4.72) (envelope-from ) id 1a6Sor-0005mT-5N for questions@freebsd.org; Wed, 09 Dec 2015 00:41:21 +0000 MIME-Version: 1.0 From: "Editor Scientific Journals" To: "questions@freebsd.org" Reply-To: info@cisjournal.org Date: 9 Dec 2015 05:42:35 +0500 Subject: Publication in Scientific Journals Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2015 00:50:55 -0000 Dear Scientists and Colleagues, It is our pleasure to invite you to send= your valuable contributions in the following Journals: JETCIS (Journal= of Emerging Trends in Computing and Information Sciences) Vol. 6 No. 11;= JST (Journal of Science and Technology) Vol. 5 No. 11; Manuscripts can= be uploaded through online system (by browsing the Journal URL) or in an= electronic form (.pdf or .doc) to: editor.scjournal@gmail.com; Sincerely= Yours, Managing Editor Journal of Science and Technology From owner-freebsd-questions@freebsd.org Wed Dec 9 00:56:32 2015 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB5AE9D52EC for ; Wed, 9 Dec 2015 00:56:32 +0000 (UTC) (envelope-from gmx@ross.cx) Received: from www81.your-server.de (www81.your-server.de [213.133.104.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 767E71145 for ; Wed, 9 Dec 2015 00:56:31 +0000 (UTC) (envelope-from gmx@ross.cx) Received: from [24.134.33.72] (helo=workstation) by www81.your-server.de with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.80.1) (envelope-from ) id 1a6T3V-0006Z0-0a; Wed, 09 Dec 2015 01:56:29 +0100 Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes To: freebsd-questions@freebsd.org, "Patrick Hess" Subject: Re: Synchronizing directory hierarchies via SFTP References: <13761006.QDN0LtKzYl@desk8.phess.net> <5263162.JaugYyUJYb@desk8.phess.net> <24246596.8z5VK3yfqz@desk8.phess.net> Date: Wed, 09 Dec 2015 01:56:25 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Michael Ross" Message-ID: In-Reply-To: <24246596.8z5VK3yfqz@desk8.phess.net> User-Agent: Opera Mail/1.0 (Win32) X-Authenticated-Sender: gmx@ross.cx X-Virus-Scanned: Clear (ClamAV 0.98.7/21143/Tue Dec 8 22:35:26 2015) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Dec 2015 00:56:32 -0000 Am .12.2015, 01:13 Uhr, schrieb Patrick Hess : > Michael Ross wrote: >> Am .12.2015, 00:43 Uhr, schrieb Patrick Hess : >> > Just came across LFTP, http://lftp.yar.ru. According to the feature >> list, >> > it has support for SFTP and also comes with a "built-in mirror and >> > reverse mirror" option. >> >> lftp is used a lot here to mirror directories via sftp. Would recommend. > > Tried it today, works like a charm. In comparison to csync, I noticed > that the initial directory traversal in particular is a lot faster > with LFTP. And since there's still a big question mark behind sshfs > regarding its stability on FreeBSD, I'll just settle for LFTP and > call it a day. > >> Check out the fine-tuning available with "set -a". > > Wow, that's a lot of stuff to mess up... Maybe some other day. > So far, the defaults seem to work just fine for me. > > Patrick > > PS: Here's the quick'n'dirty Expect script I hacked together, > in case someone has a use for it. > _______________________________________________________________________ > > expect -c ' > set timeout -1; > > spawn lftp -u '"$SFTP_USERNAME"' sftp://'"$SFTP_SERVER"'; > > expect "Passwor\[dt\]:"; > send "'"$SFTP_PASSWORD"'\r"; > > expect "lftp *> "; > send "mirror -v --reverse --dereference --delete --overwrite > --exclude-glob *.swp '"$LOCAL_DIR"' '"$REMOTE_DIR"'\r" > > expect "lftp *> "; > send "quit\r"; > > expect eof; > ' > _______________________________________________________________________ You can put it in a file #!/usr/local/bin/lftp open sftp://user:pass@host mirror -v --reverse --dereference ... and run it either per lftp -f your-file or chmod +x it and go ./your-file As for settings, I'd take a look at least at the settings for net:, you can grep for those set -a | grep net Specifically: net:max-retries 1000 net:reconnect-interval-base 30 net:reconnect-interval-max 600 net:reconnect-interval-multiplier 1.5 means, e. g. for an unreachable server, lftp will try reconnecting every interval*multiplier seconds, until the delay has reached interval-max seconds, and *repeat this max-retries times*. That gives you about a week before the script actually exits. Regards, Michael