|
|
|
registry-backup 0.4.1
|
|
|
|
Jonathan Strong <jstrong@shipyard.rs>
|
|
|
|
Download all .crate files from a registry server
|
|
|
|
|
|
|
|
USAGE:
|
|
|
|
registry-backup [OPTIONS]
|
|
|
|
|
|
|
|
OPTIONS:
|
|
|
|
--index-url <URL>
|
|
|
|
URL of the registry index we are downloading .crate files from. The program expects that
|
|
|
|
it will be able to clone the index to a local temporary directory; the user must handle
|
|
|
|
authentication if needed
|
|
|
|
|
|
|
|
--index-path <PATH>
|
|
|
|
instead of an index url, just point to a local path where the index is already cloned
|
|
|
|
|
|
|
|
-a, --auth-token <TOKEN>
|
|
|
|
If registry requires authorization (i.e. "auth-required" key is set to `true` in the
|
|
|
|
`config.json` file), the token to include using the Authorization HTTP header
|
|
|
|
|
|
|
|
-o, --output-path <PATH>
|
|
|
|
Directory where downloaded .crate files will be saved to
|
|
|
|
|
|
|
|
[default: output]
|
|
|
|
|
|
|
|
--overwrite-existing
|
|
|
|
Download files when if .crate file already exists in output dir for a given crate
|
|
|
|
version, and overwrite the existing file with the new one. Default behavior is to skip
|
|
|
|
downloading if .crate file already exists
|
|
|
|
|
|
|
|
--output-format <FORMAT>
|
|
|
|
What format to use for the output filenames. Works the same as Cargo's registry syntax
|
|
|
|
for the "dl" key in the `config.json` file in a reigstry index. See [Cargo
|
|
|
|
docs](https://doc.rust-lang.org/cargo/reference/registries.html#index-format) for
|
|
|
|
additional details. Not specifying this field is equivalent to specifying
|
|
|
|
"{crate}/{version}/download", the default.
|
|
|
|
|
|
|
|
The resulting path specified by the format should be relative; it will be joined with
|
|
|
|
the --output-path. (i.e. it should not start with "/".)
|
|
|
|
|
|
|
|
-U, --user-agent <USER_AGENT>
|
|
|
|
Value of user-agent HTTP header
|
|
|
|
|
|
|
|
[default: registry-backup/v0.4.1]
|
|
|
|
|
|
|
|
-R, --requests-per-second <INT>
|
|
|
|
Requests to registry server will not exceed this rate
|
|
|
|
|
|
|
|
[default: 100]
|
|
|
|
|
|
|
|
-M, --max-concurrent-requests <INT>
|
|
|
|
Independent of the requests per second rate limit, no more than
|
|
|
|
`max_concurrent_requests` will be in flight at any given moment
|
|
|
|
|
|
|
|
[default: 50]
|
|
|
|
|
|
|
|
-c, --config-file <PATH>
|
|
|
|
Specify configuration values using the provided TOML file, instead of via command line
|
|
|
|
flags. The values in the config file will override any values passed as command line
|
|
|
|
flags. See config.toml.sample for syntax of the config file
|
|
|
|
|
|
|
|
--filter-crates <REGEX>
|
|
|
|
Only crates with names that match --filter-crate regex will be downloaded
|
|
|
|
|
|
|
|
--dry-run
|
|
|
|
Don't actually download the .crate files, just list files which would be downloaded.
|
|
|
|
Note: --requests-per-second and --max-concurrent-requests are still enforced even in
|
|
|
|
--dry-mode!
|
|
|
|
|
|
|
|
-h, --help
|
|
|
|
Print help information
|
|
|
|
|
|
|
|
-V, --version
|
|
|
|
Print version information
|