Syncs folders into IPFS's mutable file system (the directory structure accessible through ipfs files …
).
Despite the name, FTP2MFS is capable of reading from FTP, HTTP directory listings, rsyncd, and the local filesystem.
Beware: ftp2mfs can be used to easily mirror several 100 GB in a few hours, and keep them in sync with upstream and on the local IPFS node. IPFS is not necessarily able to keep that much content available to the network from one node, see hyperprov for an explanation and a solution.
You need to create a configuration file that specifies what to sync, e.g. minimally: ```yaml
source: ftp://ftp.jaist.jp/pub/Linux/ArchLinux/core/os/x86_64/
target: /some-archlinux-core-mirror ```
Save the file as ftp2mfs-cfg1
and run ftp2mfs --config ftp2mfs-cfg1
(or cargo run --
if you did not cargo install
this).
FTP2MFS will first materialize the files in some folder in /temp
, and make a copy at $target
once it successfully completes the sync.
If the operation fails, restarting with the same configuration file should continue the operations.
Note that source folder structures are fully explored before any copying/downloading is done, so it may take a while for any files to be copied.
All source types have their advantages and drawbacks. Building nice mirrors is difficult.
(0) It might be nice to parse modification dates and file sizes from HTML directory listings
(+) Proper standardized protocol for listing directories and transferring files
(0) Support may be added for parsing some of the most common human directory listing formats
(+) Efficient sync with full metadata
(-) Not secured
(+) The only implementation where syncing is trivial and thus probably correctly implemented
```yaml
source: ftp://…|rsync://…|…
reprieve: "1 month"
ignore: # Example: Whitelist only folders a and b - "/*" - "!a" - "!b" # setting RUST_LOG=debug as environment variable may help with debugging ignore rules
user: anonymous pass: example@example.example # Many FTP servers ask you to provide your e-mail address as password
target: /publish-me
workdir: /temp/foobar
maxsymlinkcycle: 0 ```