Opened 13 years ago

Last modified 7 years ago

#15 assigned enhancement

Add support for FXP (FTP to FTP copy)

Reported by: swordp@… Owned by: schwa
Priority: minor Milestone:
Component: Library Version:
Keywords: FXP, FTP-to-FTP-copy Cc:

Description

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.

Change History (6)

comment:1 Changed 13 years ago by schwa

Keywords: FXP FTP-to-FTP-copy added
Status: newassigned
Summary: add support for fxpAdd support for FXP (FTP to FTP copy)

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?

comment:2 Changed 13 years ago by swordsp <swordsp@…>

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:)

comment:3 Changed 9 years ago by schwa

Milestone: 2.6

comment:4 Changed 8 years ago by schwa

Milestone: 2.62.7

comment:5 Changed 7 years ago by schwa

Milestone: 2.7
Priority: majorminor

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.

Last edited 6 years ago by schwa (previous) (diff)

comment:6 in reply to:  5 Changed 7 years ago by schwa

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.

Last edited 6 years ago by schwa (previous) (diff)
Note: See TracTickets for help on using tickets.