Pyftpsync

Synchronize local directories with FTP servers.

Project:https://github.com/mar10/pyftpsync/
Version:2.1, Date: Sep 02, 2018

Build Status PyPI Version License Documentation Status

_images/teaser.png

Warning

Version 2.0 introduces breaking changes to 1.x. Make sure to adjust your scripts accordingly after update.

Features

  • This is a command line tool…
  • … and a library for use in custom Python projects.
  • Recursive synchronisation of folders on file system and/or FTP targets.
  • Upload, download, and bi-directional synchronization mode.
  • Configurable conflict resolution strategies.
  • Unlike naive implementations, pyftpsync maintains additional meta data to detect conflicts and decide wether to replicate deletions or additions.
  • Unlike more complex implementations, pyftpsync does not require a database or a service running on the targets.
  • Optional FTPS (TLS) support.
  • Architecture is open to add other target types.

The command line tool adds:

  • Runs on Linux, OS X, and Windows.
  • Remember passwords in system keyring.
  • Interactive conflict resolution mode.
  • Dry-run mode.

Note

Known Limitations

  • The FTP server must support the MLSD command.
  • pyftpsync uses file size and modification dates to detect file changes. This is efficient, but not as robust as CRC checksums could be.
  • pyftpsync tries to detect conflicts (i.e. simultaneous modifications of local and remote targets) by storing last sync time and size in a separate meta data file inside the local folders. This is not bullet proof and may fail under some conditions.
  • Currently conflicts are not detected, when a file is edited on one target and the parent folder is removed on the peer target: The folder will be removed on sync.

In short: Make sure you have backups.

Quickstart

Releases are hosted on PyPI and can be installed using pip:

$ pip install pyftpsync --upgrade
$ pyftpsync --help