Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 1.2.6 instead.
Reason given by maintainers: Released in error

Pool-based content-addressable APT repository mirror sync with global deduplication via hardlinks.

Features

  • Pool-based content-addressable storage: every unique file is stored once by SHA-256 hash
  • Hardlink deduplication across all mirrored repositories
  • HTTPS-based sync with automatic upstream failover
  • Auto-discovery of distributions, architectures, and components via HTTP probing
  • Snapshot/restore system for safe repository migrations
  • Per-repo distribution expansion toggle (e.g. noblenoble-updates, noble-security, etc.)
  • GPG key URL tracking in per-repo configuration
  • Stale pool orphan detection and cleanup (--sweep-pool)

Installation

Option 1: Debian/Ubuntu Package (Recommended)

Download the latest .deb package from GitHub Releases:

curl -fsSL https://api.github.com/repos/munger/mirror-dedupe/releases/latest \
  | grep browser_download_url | grep all.deb | head -1 | cut -d'"' -f4 \
  | xargs wget
sudo dpkg -i mirror-dedupe_*.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 (mirror_root, concurrency, etc.)
  • repos-available/ — Available repository configurations
  • repos-enabled/ — Enabled repositories (symlinks to repos-available)

mirror_root is the single root for all mirror data. Repositories are stored under <mirror_root>/repos and the deduplication pool under <mirror_root>/pool. Both always share the same logical volume, which is required for hardlinks.

Adding a Repository

Use --scan to auto-generate configuration for a repository:

mirror-dedupe --scan --name grafana --out /etc/mirror-dedupe/repos-available https://apt.grafana.com

See config/repos-available/README.md for the full scan reference and ready-made commands for all packaged example repositories.

Then test and enable it:

mirror-dedupe --test grafana
mirror-dedupe --activate grafana

Advanced: Alternative config directory

Override the default config directory with --config-dir:

mirror-dedupe --config-dir /tmp/mirror --test grafana

Pre-configured Repositories

The package includes pre-configured repository definitions in config/repos-available/.

Usage

# Sync all enabled mirrors
mirror-dedupe --sync

# Sync a specific mirror
mirror-dedupe --sync --mirror ubuntu

# Scan a repository and generate config (single release)
mirror-dedupe --scan --name ubuntu --release noble --out /etc/mirror-dedupe/repos-available http://archive.ubuntu.com/ubuntu

# Scan with all discovered architectures and distributions
mirror-dedupe --scan --name postgresql --no-filter --out /etc/mirror-dedupe/repos-available http://apt.postgresql.org/pub/repos/apt

# Scan without JSON snapshot
mirror-dedupe --scan --name grafana --out /etc/mirror-dedupe/repos-available https://apt.grafana.com

# Pool orphan sweep
mirror-dedupe --sweep-pool

# Create a hardlink snapshot of all repos
mirror-dedupe --snapshot

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

Release files for mirror-dedupe 1.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mirror-dedupe 1.0.7
File Size Uploaded
mirror_dedupe-1.0.7.tar.gz 189.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mirror-dedupe 1.0.7
File Interpreter ABI Platform
mirror_dedupe-1.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 446.9 kB

Release files / mirror_dedupe-1.0.7.tar.gz

Download URL mirror_dedupe-1.0.7.tar.gz
Size 189.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d8de2f305c3273c4f81fac68cae4ec4571b2089893b7ae75471993fdc4250ee4
BLAKE2b-256 checksum
How to use checksums
6bccb6fcf2832244ceb07e02d731e74165b9a91a6c8b79415b5fd0bba0fe7cce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / mirror_dedupe-1.0.7-py3-none-any.whl

Download URL mirror_dedupe-1.0.7-py3-none-any.whl
Size 257.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c9b0c22192e718910bacf1f896d73e3d0ded5790c31617ffaf98fc4fc4c36268
BLAKE2b-256 checksum
How to use checksums
bdb9589aa1b8bce636c719f56a5353fadc9bacee8f718a0f72748e3fc97df8f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release history Release notifications | RSS feed

1.2.6

2 release files

1.2.5

2 release files

1.2.4

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

This release

1.0.7 This release

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

0.2.11

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page