Workaround bzr-upload FTP “Connection reset by peer” issues

Have problems using the bzr-upload plugin to upload to an FTP server? I recently had repeated troubles getting a large web site to complete the initial full upload to an FTP server on a not so great connection. The upload would start fine, make it partial way through, and quit with the error:

bzr: ERROR: socket.error: (54, 'Connection reset by peer')

Repeating the bzr upload command causes it to start all over only to fail again later on (not on the same file).

The great people on the bzr-upload team pointed out that you can “upload” to a directory and copy that directory as a workaround:

  1. Upload to a directory (to get the revid file that is used to drive incremental uploads)

    bzr upload ../tmp
  2. Manually copy the directory using FTP software or other, more reliable means.

  3. Future uploads can be done incrementally:

    bzr upload --remember ftp://user@ftp_host/destination_dir/

This is a good workaround because once it’s done there should be no problem using bzr-upload’s incremental upload capability with future changes. I have never liked FTP synchronization tools because they are slow and don’t take advantage of the “ignore” files already present (e.g. .bzrignore).

A fix around the corner?

BZR’s FTP transport layer and bzr-upload plugin will hopefully become more robust in the future making this workaround unnecessary. Here’s a small list of pending issues I would like to see resolved:

Tags: , ,

Comments are closed.