LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 03-30-2007, 02:45 AM   #1
vinayras
LQ Newbie
 
Registered: Jan 2003
Location: Nagpur, India
Distribution: Fedora Core 1.0
Posts: 6

Rep: Reputation: 0
Automate FTP steps


Hi All,

I have few FTP steps that i need to run several times.

For Example:

reseller/
reseller/admin

I want to upload all content of these folders to several websites, named

abc.com
abs.com
ddd.com
etc

I want to write a script that will take few arguments from a script and run the steps - updating all websites.

I tried searching on the net - and found something about kermit - but am not sure this will be good solution.

I think NcFTP can do this in a better manner.

Can anyone please guide me?

thanks in advance.
 
Old 03-30-2007, 03:28 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,378

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
so what's the actual problem here? it's trivial to write a bash script to run some ftp commands. what's your stumbling block?
 
Old 03-30-2007, 04:10 AM   #3
vinayras
LQ Newbie
 
Registered: Jan 2003
Location: Nagpur, India
Distribution: Fedora Core 1.0
Posts: 6

Original Poster
Rep: Reputation: 0
Re: FTP batch

Quote:
Originally Posted by acid_kewpie
so what's the actual problem here? it's trivial to write a bash script to run some ftp commands. what's your stumbling block?
I think i was not clear enough.

I want to update some code (PHP scripts + templates) on several servers via FTP. How can this be done? Can this be achieved via NcFTP?

something like.

connect to sever 1
upload files
disconnect from server 1

connect to server 2
upload files
disconnect from server 2

and so on.

Please let me know if i am clear now.

Thanks
 
Old 03-30-2007, 04:46 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,378

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
well yes, like i said, just a case of writing a small batch file. if you want to use ncftp for the sake of it, it appears to include an ncftpbatch command to accept jobs in batch, just check the docs for it.
 
Old 03-30-2007, 06:06 AM   #5
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Lenny/Squeeze/Wheezy/Sid
Posts: 4,053

Rep: Reputation: 484Reputation: 484Reputation: 484Reputation: 484Reputation: 484
The best is to write a small batch script. Use ncftput, in that way you can give login parameters etc on the command line. ncftpput can handle multiple files at once so you need only one command per directorty.

You can put the call to your bash script in a cron job.

This is so reliable that I once discovered that the script still was doing a succesful upload of something while the project had already stopped 2 years before...

jlinkels
 
  


Reply

Tags
ftp, linux, ncftp, website


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
LXer: Speaking Unix, Part 6: Automate, automate, automate! LXer Syndicated Linux News 0 01-04-2007 09:54 AM
How to automate an FTP process? ksakamuri Linux - Newbie 6 11-05-2006 05:52 PM
automate ftp (non-GUI) prx Linux - Software 1 04-26-2005 09:14 PM
Kermit Script to Automate FTP SSL/TLS fiddelm3742 Linux - Software 0 05-18-2004 11:53 PM
Automate FTP noodle123 Linux - General 1 10-15-2002 04:50 PM


All times are GMT -5. The time now is 02:46 AM.

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