GithubHelp home page GithubHelp logo

muskanmahajan37 / mirror-clone Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sjtug/mirror-clone

0.0 0.0 0.0 288 KB

All-in-one mirror utility for SJTUG mirror

License: Apache License 2.0

Rust 100.00%

mirror-clone's Introduction

mirror-clone

An all-in-one mirror utility.

For more information about our mirror service, refer to https://github.com/sjtug/mirror-docker-unified/wiki For legacy version, refer to legacy branch.

mirror-clone is originally built for setting up a mirror repo on SJTU S3 service, and now being made into an all-in-one mirror tool. The most notable feature of mirror-clone is to synchronize files from Rsync endpoint to S3.

Design

sjtug#14

mirror-clone revolves around abstractions like source, target, snapshot, and transfer. By assembling them, we can get a task that transfers one repo to another.

Quick Start

RUST_LOG=info ./mirror-clone --progress --target-type s3 --s3-prefix homebrew-bottles --s3-buffer-path /srv/disk1/mirror-clone-cache homebrew
RUST_LOG=info ./mirror-clone --progress --target-type s3 --s3-prefix crates.io/crates --s3-buffer-path /srv/disk1/mirror-clone-cache crates-io
RUST_LOG=info ./mirror-clone --progress --target-type file --file-base-path ~/mirror-clone/crates.io --file-buffer-path ~/Work/intel_temp crates-io

When running on server, we recommend using RUST_LOG=info flag and remove --progress flag.

For more usage, refer to our infra wiki.

Implementation

Transfer

  • Simple Diff Transfer, compares filename and transfer what's missing in target.

Snapshot

Refer to source code for more information.

Source

Refer to source code for more information.

Target

  • mirror-intel, sends HEAD request to mirror-intel endpoint, so as to fill the mirror-intel cache.
  • S3
  • File system

Commands

Use ./mirror-clone --help to view current commands and their meaning.

Future Works

  • More pipes. For example, snapshot cache pipe, etc.
  • More sources.
  • More transfers.

mirror-clone's People

Contributors

photonquantum avatar skyzh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.