~sschwarzer/ftputil#15: 
Add support for FXP (FTP to FTP copy)

I think it extremely useful for ftp admins, but neither ftplib nor ftputil support it.

Of course, download from one host then upload to another is a workaround, but it's really not a efficient way.

Status
REPORTED
Submitter
swordp@gmail.com (unverified)
Assigned to
No-one
Submitted
17 years ago
Updated
17 years ago
Labels
enhancement library

schwa (unverified) 17 years ago · edit

I like the idea; it's surely more efficient to copy directly from FTP host to FTP host.

As I said in a comment in ticket #6, I would like to experiment with FXP in the mirror script. (Hm, I see that FXP can useful in other situations than mirroring trees).

A workaround (beside the one you mention) for your problem might be to run a regular up/download on one of the FTP hosts itself. However, I'm aware that this has the downside that you need shell access to that host or know someone who has shell access and puts your script on that host.

Do you ask out of curiosity, or have you already run into a situation where you would like to use FXP?

Another question: Did you deliberately classify the ticket's priority as "major" or did you just keep the default value? Is the priority "major" from your point of view or needs?

swordsp <swordsp@gmail.com> (unverified) 17 years ago · edit

Hi Stefan, thanks for you offering such a great library!

For the ticket's priority, I just leave it as the default value, I'm sorry I'm not very familar with Trac.

I agree that not everyone need this feature, even some famous FTP client (eg, FileZilla?) don't support it, but it really useful for ftp administrators. At sometimes, the ftp administrators can only access the server via ftp protocol, so many operations depend on the ftp client tool (or scripts).

For my situation, I run a series of ftprush script to syncronize a ftp server from several upstream servers everyday. But I like python more and would like to rewrite it to a python script for more flexibility.

On the other hand, I think it's really a low-level operation which doesn't like things such as downloadtree() which just a handy goodie. You need to call the _session attribute and send raw ftp command to implement it, I think it break the encapsulation in some sense. That's why I hope it can be supported directly by the library.

Thanks again for your reply:)

schwa (unverified) 11 years ago · edit

One mail told me that there's a function ftpcp for that purpose in ​ftplib in Python 2.7. This function isn't documented, and might hence be removed in the future, but I think it's highly unlikely, since it's still ​present in Python 3.2, too.

It would be nice if the next person missing an FXP feature in ftputil would try the function and add a comment about the outcome of the experiments to this ticket.

schwa (unverified) 11 years ago · edit

Replying to schwa:

One mail told me that there's a function ftpcp for that purpose in ​ftplib in Python 2.7. This function isn't documented, and might hence be removed in the future, but I think it's highly unlikely, since it's still ​present in Python 3.2, too.

In case the function doesn't work as expected, there's a description about server-to-server connections in ​RFC 959, section 5.2.

Register here or Log in to comment, or comment via email.