From owner-freebsd-questions@FreeBSD.ORG Wed Apr 1 17:03:24 2009 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 E8F81106566C for ; Wed, 1 Apr 2009 17:03:24 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id 6705B8FC12 for ; Wed, 1 Apr 2009 17:03:24 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.3/8.14.3) with ESMTP id n31H2xYg071652; Wed, 1 Apr 2009 19:03:22 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.3/8.14.3/Submit) id n31H2xZI071651; Wed, 1 Apr 2009 19:02:59 +0200 (CEST) (envelope-from olli) Date: Wed, 1 Apr 2009 19:02:59 +0200 (CEST) Message-Id: <200904011702.n31H2xZI071651@lurza.secnetix.de> From: Oliver Fromme To: freebsd-questions@FreeBSD.ORG, ohartman@zedat.fu-berlin.de In-Reply-To: <49D39153.4020707@zedat.fu-berlin.de> X-Newsgroups: list.freebsd-questions User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.4-PRERELEASE-20080904 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Wed, 01 Apr 2009 19:03:22 +0200 (CEST) Cc: Subject: Re: Fetching directories inclusive subdirectories on HTTP server via fetch or othe FreeBSD-own tools? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-questions@FreeBSD.ORG, ohartman@zedat.fu-berlin.de List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2009 17:03:25 -0000 O. Hartmann wrote: > I run into a problem I can not solve. I need to fetch a whole directory > tree from a public remote site. The top level directory and its > subdirectories are accessible via ftp:// and http:// so I tried fetch, > but fetch does only retrieve data on file basis and does not copy a > whole directory tree recursively. The remote site does not offer > sftp/sshd for that purpose. > > Is there a simple way to perform such a task with FreeBSD's own tools (I > try to avoid installing 'wget' and sibblings)? I need to keep it simple, > task should be performed via cronjob. I'm afraid you can't do that with FreeBSD base tools. An alternative to wget would be "omi" (ports/ftp/omi) which is a simple FTP mirroring tool, written in C without any dependencies. Usage is simple: $ omi -s server.name.com -r /remote/dir -l ./local/dir Note that, by default, it tries to synchronize the local dir perfectly, i.e. if the remote dir is empty, it will wipe out the local dir. (The option "-P 0" will prevent omi from removing anything.) Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "That's what I love about GUIs: They make simple tasks easier, and complex tasks impossible." -- John William Chambless