https://github.com/selectel/mirror-sync
Collection of scripts for linux rpm/deb repositories mirroring
https://github.com/selectel/mirror-sync
community
Last synced: about 1 year ago
JSON representation
Collection of scripts for linux rpm/deb repositories mirroring
- Host: GitHub
- URL: https://github.com/selectel/mirror-sync
- Owner: selectel
- License: gpl-2.0
- Created: 2013-10-31T12:36:14.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2021-01-13T13:11:52.000Z (over 5 years ago)
- Last Synced: 2025-04-30T16:17:40.323Z (about 1 year ago)
- Topics: community
- Language: Shell
- Homepage:
- Size: 39.1 KB
- Stars: 25
- Watchers: 21
- Forks: 13
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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