MIRROR-DEDUPE-SCAN(1)

NAME
mirror-dedupe-scan - scan and generate repository configuration for mirror-dedupe

SYNOPSIS
mirror-dedupe-scan [--name NAME] [--dest DEST] [--config-dir DIR] UPSTREAM-URL

DESCRIPTION
mirror-dedupe-scan automatically scans a Debian/Ubuntu repository and generates a configuration file for use with mirror-dedupe. It detects the sync method (rsync or HTTPS), available architectures, components, distributions, and GPG key locations.

The generated configuration is saved to /etc/mirror-dedupe/repos-available/ and can be enabled by creating a symlink in /etc/mirror-dedupe/repos-enabled/.

OPTIONS

--name NAME
    Repository name (required). Used for the configuration filename.

--dest DEST
    Destination path relative to repo_root (required).

--config-dir DIR
    Configuration directory (default: /etc/mirror-dedupe).

UPSTREAM-URL
    URL of the upstream repository to scan.

EXAMPLES
Scan the Ubuntu archive:

    mirror-dedupe-scan --name ubuntu --dest ubuntu/main \
        http://archive.ubuntu.com/ubuntu

Scan the Grafana repository:

    mirror-dedupe-scan --name grafana --dest grafana \
        https://apt.grafana.com

Scan Docker repository:

    mirror-dedupe-scan --name docker --dest docker \
        https://download.docker.com/linux/ubuntu

AUTO-DETECTION
The scanner automatically detects:

Sync method
    Tests if rsync is available, otherwise uses HTTPS

Architectures
    Parsed from the Release file

Components
    Parsed from the Release file

Distributions
    Discovered by listing the dists/ directory

GPG keys
    Checks common GPG key locations

ENABLING A REPOSITORY
After scanning, enable the repository:

    cd /etc/mirror-dedupe/repos-enabled
    ln -s ../repos-available/NAME.conf .

FILES

/etc/mirror-dedupe/repos-available/
    Directory containing available repository configurations

/etc/mirror-dedupe/repos-enabled/
    Directory containing enabled repository configurations (symlinks)

SEE ALSO
mirror-dedupe(1)

AUTHOR
Copyright (c) 2025 Tim Hosking
Email: tim@mungerware.com
Website: https://github.com/munger
Licence: MIT