| 1 |
Copyright (c) Martin Wilck 2006 |
|---|
| 2 |
|
|---|
| 3 |
See the file LICENSE for copyright information. |
|---|
| 4 |
|
|---|
| 5 |
ftpsync is a tool for mirroring (uploading) data to FTP servers written in Python. |
|---|
| 6 |
It is built upon functionality in Stefan Schwarzer's ftputil package. |
|---|
| 7 |
It has been tested with Python 2.3 and 2.4 and ftputil 2.1 under Linux. |
|---|
| 8 |
|
|---|
| 9 |
Usage: ftpsync.py [options] host source-dir target-dir |
|---|
| 10 |
Known options: --exclude=<pattern>, |
|---|
| 11 |
--include=<pattern>, |
|---|
| 12 |
--exclude-from=<pattern-file>, |
|---|
| 13 |
--include-from=<pattern-file>, |
|---|
| 14 |
--delete, |
|---|
| 15 |
--delete-excluded, |
|---|
| 16 |
--dry-run, |
|---|
| 17 |
--verbose, --quiet, --debug, |
|---|
| 18 |
--trace=<log file>, |
|---|
| 19 |
--cache-expire=<seconds>, |
|---|
| 20 |
--cache-size=<entries> |
|---|
| 21 |
|
|---|
| 22 |
Most options are equivalent to rsync(1)'s respective options. |
|---|
| 23 |
|
|---|
| 24 |
Features: |
|---|
| 25 |
* include/exclude logic like rsync(1). |
|---|
| 26 |
(Note: there is a script called rsync.py in the Python package index. |
|---|
| 27 |
I have tested it and found it did not mimic rsync's logic correctly). |
|---|
| 28 |
* Caching of FTP directory contents (simple FTPHost._dir() caching, |
|---|
| 29 |
but speed up can be quite big) |
|---|
| 30 |
* Deals with case-insensitive FTP server |
|---|
| 31 |
|
|---|
| 32 |
TODO: * download script |
|---|
| 33 |
* proper packaging |
|---|
| 34 |
* ... |
|---|
| 35 |
|
|---|
| 36 |
Files in this directory: |
|---|
| 37 |
|
|---|
| 38 |
ftpsync.py: main script |
|---|
| 39 |
|
|---|
| 40 |
caching_ftp.py: CachingFTPHost object, derived from ftputil |
|---|
| 41 |
casepath.py: case-insensitive 'path' and 'stat' objects, derived from ftputil |
|---|
| 42 |
|
|---|
| 43 |
sync.py: abstract synchronizing logic |
|---|
| 44 |
rsyncmatch.py: rsync-style globbing and include/exclude patterns |
|---|
| 45 |
casestr.py: case-insensitive string class |
|---|
| 46 |
simplecache.py: a very simplistic cache implementation |
|---|
| 47 |
loggingclass.py: a small commodity layer above 'logging' |
|---|