Giter Club home page Giter Club logo

mirror-sync's Introduction

Mirror-sync

Script set for partial rpm/deb repositories mirroring with sanity check.

Description

WARNING: This set of scripts is not designed to be used on 'live' repositories that are available to clients during synchronization It violates common synchronization order(packages first, metadata later) to provide partial mirroring capability. It means that repositories will be inconsistent during the update. Please use these scripts in conjunction with snapshots, on inactive repos, etc.

Only rsync mirrors are supported.

There are currently three mirroring scripts, all of them take path to config file as a first argument.

  • rpm-mirror - script for mirroring RPM repositories
  • deb-mirror - script for mirroring DEB repositories
  • arch-mirror - script for mirroring Archlinux repositories

You can see some config examples at the config/ directory.

Installation

Clone this repo to preferable location, for example /opt/mirror-sync:

cd /opt
git clone https://github.com/selectel/mirror-sync.git mirror-sync

Create user for running mirroring scripts:

adduser --no-create-home --home /opt/mirror-sync mirror

Create repository storage, for example at /srv/www/mirror and give ownership to mirror user:

mkdir -p /srv/www/mirror/{debian,centos}
chown -R mirror:mirror /srv/www/mirror

Optionally create log directory:

mkdir -p /var/log/mirror-sync
chown -R mirror:mirror /var/log/mirror-sync

Create/edit configuration files for required repositories:

vim /opt/mirror-sync/config/centos.cfg
vim /opt/mirror-sync/config/debian.cfg

Now you can start synchronization of desired repository:

/opt/mirror-sync/rpm-mirror /opt/mirror-sync/config/centos.cfg

or:

/opt/mirror-sync/deb-mirror /opt/mirror-sync/config/debian.cfg

mirror-sync's People

Contributors

redrampage avatar t-sh avatar ad 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.