Title: Message
I use this quick and dirty little perl script to transfer files from my Linux boxes to our windows backup server:
 
#!/usr/bin/perl
open (FTP, "|/usr/bin/ftp -n") || die "Can't open FTP command, $!\n";
print FTP <<"EOFTP";
open 192.168.1.1
user username password
bin
prompt
lcd /backups/
cd /backups/linux-svr-21
mput *.tar.gz
EOFTP
close FTP;
 
I'm sure there is a much cleaner and efficient way of doing this, but this works great for simple linux backup operations that I do.  I have another script that does the backup job, then afterwards this one uploads the tar.gz files to my backup server.
 
 - nick 

-----Original Message-----
From: S Peram [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 19, 2002 12:29 PM
To: [EMAIL PROTECTED]
Subject: script for ftp transfer

Hi all,

I need to transfer some log files on a daily basis from my machine to a windows machine.

I'd really appreciate if any of you can give me some ideas, my situation is that I can't put ftp server on that machine and so the file transfers should originate from the Linux machine.

I was thinking of some kind of a cron job but I've run out of ideas.

I'd appreciate if any of you gurus can help me with some scripts or links.

 

Thanks,

 

Peram

 



Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!

This email and any files transmitted with it are confidential and are intended solely for the use of the individual or entity to whom they are addressed. This communication represents the originator's personal views and opinions, which do not necessarily reflect those of the company. If you are not the original recipient or the person responsible for delivering the email to the intended recipient, be advised that you have received this email in error, and that any use, dissemination, forwarding, printing or copying of this email is strictly prohibited. If you received this email in error, please immediately notify the sender.

Reply via email to