Skip to main content

Ubuntu mirror synchronisation with global deduplication

Project description

Ubuntu/Debian mirror synchronisation with intelligent deduplication using hardlinks.

Features

  • Downloads from upstream and hardlinks duplicate files (same SHA256 hash) to save bandwidth and disk space
  • Supports multiple mirrors with global deduplication across all mirrors
  • Uses curl for duplicate files, rsync for unique files and metadata
  • Configurable via YAML files
  • Systemd timer support for automated synchronisation

Installation

Option 1: Debian/Ubuntu Package (Recommended)

Download the latest .deb package from GitHub Releases:

wget https://github.com/munger/mirror-dedupe/releases/download/v0.1.0/mirror-dedupe_0.1.0-1_all.deb
sudo dpkg -i mirror-dedupe_0.1.0-1_all.deb

This includes systemd integration, man pages, and proper package management.

Option 2: PyPI (All Linux Distributions)

pip install mirror-dedupe

Then install systemd files manually:

sudo ./install.sh --pip

Option 3: From Source

git clone https://github.com/munger/mirror-dedupe.git
cd mirror-dedupe
sudo ./install.sh

Configuration

Configuration files are located in /etc/mirror-dedupe/:

  • mirror-dedupe.conf - Global settings
  • repos.d/*.conf - Individual repository definitions

See the config/ directory for examples.

Usage

# Sync all mirrors
mirror-dedupe

# Sync specific mirror
mirror-dedupe --mirror ubuntu

# Dry run
mirror-dedupe --dry-run

# Dedupe only (no sync)
mirror-dedupe --dedupe-only

Systemd Integration

If installed via Debian package, systemd is already configured. Otherwise:

sudo systemctl enable --now mirror-dedupe.timer
sudo systemctl status mirror-dedupe.timer

View logs:

journalctl -u mirror-dedupe.service

Nginx Configuration

See nginx/mirror.conf for an example nginx configuration.

License

MIT License - see LICENSE file for details.

Author

Tim Hosking tim@mungerware.com

https://github.com/munger/mirror-dedupe

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mirror_dedupe-0.1.0.tar.gz (25.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mirror_dedupe-0.1.0-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

Details for the file mirror_dedupe-0.1.0.tar.gz.

File metadata

  • Download URL: mirror_dedupe-0.1.0.tar.gz
  • Upload date:
  • Size: 25.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for mirror_dedupe-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a5b968af4888f953779c0f675fc72251a99b05332aac22a767c7061e22234dcd
MD5 8ed57c9f1526cdb81b846c99f21a05c7
BLAKE2b-256 1ceff1b075887dd4fd706a270acba0100f0a90296f44b99e93e85c9f1d5b7449

See more details on using hashes here.

File details

Details for the file mirror_dedupe-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mirror_dedupe-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for mirror_dedupe-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1eb0a3824b013cfcb9b21fe2808471258b0415dc635a7f913308e397e32891ba
MD5 fdbf5530394997593cad3d935393eed0
BLAKE2b-256 501781bf75159116fae37fecbcff2a9afbce2cef545fcaed67c19a44aaeeb892

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page