Skip to content

Bootstrap mirror from SJTUG

Alex Chi edited this page Mar 4, 2021 · 2 revisions

SJTUG develops a lot of tools to make mirroring easier. For example, mirror-clone and mirror-intel. You can bootstrap repositories supported by these tools from SJTUG mirror.

One example is to bootstrap crates.io mirror.

# First of all, try to synchronize 10000 objects to test availability.
RUST_LOG=info ./mirror-clone --progress --target-type file --file-base-path ~/mirror-clone/crates.io --file-buffer-path ~/Work/intel_temp --crates-base https://s3.jcloud.sjtu.edu.cn/899a892efef34b1b944a19981040f55b-oss01/crates.io/crates --debug crates-io
# Then, initiate full mirroring
RUST_LOG=info ./mirror-clone --progress --target-type file --file-base-path ~/mirror-clone/crates.io --file-buffer-path ~/Work/intel_temp --crates-base https://s3.jcloud.sjtu.edu.cn/899a892efef34b1b944a19981040f55b-oss01/crates.io/crates crates-io
# After that, switch to official upstream
RUST_LOG=info ./mirror-clone --progress --target-type file --file-base-path ~/mirror-clone/crates.io --file-buffer-path ~/Work/intel_temp crates-io

You may remove --progress flag if running as a cron job.

Clone this wiki locally