LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Automate FTP steps (https://www.linuxquestions.org/questions/linux-software-2/automate-ftp-steps-541833/)

vinayras 03-30-2007 02:45 AM

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.

acid_kewpie 03-30-2007 03:28 AM

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?

vinayras 03-30-2007 04:10 AM

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

acid_kewpie 03-30-2007 04:46 AM

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.

jlinkels 03-30-2007 06:06 AM

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


All times are GMT -5. The time now is 10:09 PM.