lftp
Mirror an anonymous FTP site using lftp’s mirror command, with support for
fine-grained regex-based exclusions via lftp’s -x and -X patterns.
src must be an ftp:// URL without credentials, a query, a fragment, or
percent-encoded characters. mirror.py always configures the anonymous user and
derives the anonymous password from the source hostname.
Options
Option |
Type |
Default |
Required |
Description |
|---|---|---|---|---|
|
string |
(none) |
No |
Only |
|
bool |
|
No |
Pass |
|
list of string |
|
No |
Regex patterns passed as |
|
list of string |
|
No |
Regex patterns passed as |
|
list of string |
|
No |
Shell-glob |
|
int (1-100) |
|
No |
Sets lftp’s |
|
int (1-3600) |
|
No |
Sets lftp’s |
Example
This entry is ready to place inside the top-level packages object:
"example-ftp": {
"name": "Example FTP",
"id": "example-ftp",
"href": "/example-ftp",
"synctype": "lftp",
"syncrate": "PT12H",
"link": [{ "rel": "HOME", "href": "https://ftp.example.org/" }],
"settings": {
"hidden": false,
"src": "ftp://ftp.example.org/pub/data/",
"dst": "/srv/mirror/example-ftp",
"options": {
"list_options": "-a",
"scan_all_first": false,
"exclude_x": ["\\.in\\..*\\."],
"exclude_X": ["\\.(mirror|notar)", "lost+found"],
"exclude": ["*.tmp", "*.bak"],
"max_retries": 5,
"net_timeout": 120
}
}
}
Full reference
See the Configuration reference (section 4) for the authoritative narrative.