Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 04-26-2005, 08:31 PM   #1
LQ Newbie
Registered: Feb 2005
Location: Boulder County, Colorado
Distribution: Centos5,6,7(production)/OSX(dev/personal laptop)
Posts: 11

Rep: Reputation: 0
automate ftp (non-GUI)


I have a directory which folders containing files get put into by various users on server1:


so inside /pub/public/outgoing, there could be subdirectories and other subdirectories within those subdirectories.

Everything that gets put in this directory, I want to send via ftp to server2 with a real login username and password that is required on server2, recreating all those same directories, subdirectories, and files.

I DO NOT want to tar these files up first, because I do not have the ability to untar them on server2.


I am looking for a script or some advice on pulling this off. I would like to run a cron job to move this stuff from server1 to server2, then rm or move to tmp the files which have been ftp'd to server2.

Thanks for any advice you can give in advance!

Something out there must already do this, I'm just not finding what I'm looking for.

Old 04-26-2005, 09:14 PM   #2
Senior Member
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 96

I do this to keep my website updated
cd /pub/public/outgoing
lftp -c 'open -u USERNAME,PASSWORD SERVER2; mirror -R -e -L; quit'
And that's about it. Have a look at 'man lftp' to see exactly what the mirror arguments do.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kermit Script to Automate FTP SSL/TLS fiddelm3742 Linux - Software 0 05-18-2004 11:53 PM
gui FTP server seriv Linux - Newbie 3 07-28-2003 09:38 PM
wu-ftp gui pyropenguin Linux - Networking 1 11-26-2002 02:55 PM
Automate FTP noodle123 Linux - General 1 10-15-2002 04:50 PM
Ftp Gui Half_Elf Linux - Networking 1 04-24-2002 03:07 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:06 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration