LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   file transfer from one ftp server to another ftp server (https://www.linuxquestions.org/questions/linux-newbie-8/file-transfer-from-one-ftp-server-to-another-ftp-server-791054/)

divyashree 02-23-2010 01:11 PM

file transfer from one ftp server to another ftp server
 
I have login of two ftp servers ,and I want to transfer the data from one ftp server to another ftp server .How can I do that,without downloading to local and then upload to other ftp ?

JimBrewster 02-23-2010 01:13 PM

Can you also ssh to one of the hosts? Then you will be able to ftp to/from the other.

divyashree 02-23-2010 01:25 PM

Quote:

Originally Posted by JimBrewster (Post 3874113)
Can you also ssh to one of the hosts? Then you will be able to ftp to/from the other.

No bro,if that's the case I wouldn't have asked the question here .

avtandil_k 02-23-2010 04:40 PM

I myself never used it but perhapt scp will work for you.

chrism01 02-23-2010 04:44 PM

Once you're logged into an ftp session, you only have a limited set of cmds available; 'ftp' is not one of those.
If you can mount the ftp area onto another system eg via nfs, you could then ftp the content to another system.
If you can mount both ftp areas, then a simple cp should work, I think.

divyashree 02-23-2010 10:00 PM

Quote:

Originally Posted by chrism01 (Post 3874308)
Once you're logged into an ftp session, you only have a limited set of cmds available; 'ftp' is not one of those.
If you can mount the ftp area onto another system eg via nfs, you could then ftp the content to another system.
If you can mount both ftp areas, then a simple cp should work, I think.

That's a good idea chris ,it should work .Let me try it .
But after mounting the ftp via nfs where will I provide username and password to login there ?

chrism01 02-23-2010 10:39 PM

Unfortunately, the ftp server has to nfs export it to make it avail to you; client & server remember ;)

In general, the options are:

1. it can't be done ie ftp -> ftp; you have to download then upload
2. the src is exported via nfs or samba or sshfs and you ftp from there
3. both src & destn are exported and just use cp

sandeep1508 02-24-2010 02:48 AM

If you have nfs/samba on both the servers , then you can mount both the shares on your system and just copy command will work

mount -t cifs //<server1IP>/<share> <absolute_Path_on_local_system> -ousername=<samba_username>,passwd=<samba_password>

this mounts the samba share in your system at location <absolute_Path_on_local_system>

repeat the same for other server also and just do copy between these 2 locations

Hope this helps


All times are GMT -5. The time now is 05:12 PM.