From owner-freebsd-questions Thu Aug 17 18:53:15 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.129.65]) by hub.freebsd.org (Postfix) with ESMTP id 46FCC37BC52 for ; Thu, 17 Aug 2000 18:51:00 -0700 (PDT) Received: from mta3.tm.net.my (mta3.tm.net.my [202.188.0.147]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C2476E3BA8 for ; Thu, 17 Aug 2000 18:23:16 -0700 (PDT) Received: from setan ([202.188.127.2]) by mta3.tm.net.my (InterMail v03.02.05 118 121 101) with SMTP id <20000818012318.BTIO13848@setan>; Fri, 18 Aug 2000 09:23:18 +0800 Message-ID: <028f01c5a394$a5361740$0b1603c8@tmmaster> From: "Rezamys" To: "Nathan Vidican" Cc: References: <00d101c5a21a$4aa05c80$0b1603c8@tmmaster> <399A9EA4.6009120F@wmptl.com> Subject: Re: FTP Using Cron in Freebsd 4.0 Date: Thu, 18 Aug 2005 09:32:03 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6600 Disposition-Notification-To: "Rezamys" X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi Nathan, Could I have the perl script? TQ ----- Original Message ----- From: "Nathan Vidican" To: "Rezamys" Cc: Sent: Wednesday, August 16, 2000 10:01 PM Subject: Re: FTP Using Cron in Freebsd 4.0 > > Rezamys wrote: > > > > Hello All, > > > > I would like to know is there any possibility that by using Cron one > > can automatically ftp to another server? > > > > My idea is: > > a) Set time; say after every 30 minutes run cron job > > b) Ftp to another database server (in this case the server runs on > > solaris 2.6). Directory is /pub > > c) Extract new data from that d/base server & put it in my Freebie > > server; say directory /pub/something > > d) Mark a time "tag" on each new data > > > > If it can be done so, how? > > Is there any configuration script sample that I can refer or any site > > that you can point to? > > > > > > All advise is much appreciated. > > TQ > > > > > > I have a similar script, it does the opposite though; it uploads a file. > I have the script tar our entire database structure, then upload it via > ftp to a windows box which intern places the file into a directory on a > Novell fileserver with the date/time as it's filename, example: > 20000816-database.tgz. > The script is written in PERL, and it uses a system() call to > 'ncftpput'. Ncftpput/ncftpget will allow you to put/get files to/from an > ftpserver via the command line, (which could also be a system call from > a script or other program). ncftp is in the ports collection, (that's > where I got it from anyhow). Mine runs from cron on a nightly basis, so > the time portion was of no concern to me, but it should be just as easy > as placing the date into the filename. > If you want, I could email you a copy of the script I wrote? You could > easily modify it to do what you want. Of course, you could probably do > this with a simple shell script, but I know PERL, and I don't know shell > scripting very well; so I used PERL. > > -- > Nathan Vidican > webmaster@wmptl.com > Windsor Match Plate & Tool Ltd. > http://www.wmptl.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message