{"id":32698730,"url":"https://github.com/behnam0x/debian-mirror-sync","last_synced_at":"2026-05-02T18:36:35.168Z","repository":{"id":318869825,"uuid":"1076783477","full_name":"behnam0x/debian-mirror-sync","owner":"behnam0x","description":"Bash script for interactive and customizable Debian mirror synchronization using debmirror. Supports multiple distros, suites, and section filtering with lockfile handling and logging.","archived":false,"fork":false,"pushed_at":"2025-10-29T08:34:04.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-01T21:04:31.620Z","etag":null,"topics":["automation","bash","bookworm","bullseye","buster","debian","debmirror","forky","linux","mirrored-repository","offline-repos","sid","stretch","trixie"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/behnam0x.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-15T10:40:10.000Z","updated_at":"2025-10-29T08:34:08.000Z","dependencies_parsed_at":"2025-10-16T23:26:49.990Z","dependency_job_id":"fbef31d2-fbba-4454-b142-20861676e0f3","html_url":"https://github.com/behnam0x/debian-mirror-sync","commit_stats":null,"previous_names":["behnam0x/debian-mirror-sync"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/behnam0x/debian-mirror-sync","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/behnam0x%2Fdebian-mirror-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/behnam0x%2Fdebian-mirror-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/behnam0x%2Fdebian-mirror-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/behnam0x%2Fdebian-mirror-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/behnam0x","download_url":"https://codeload.github.com/behnam0x/debian-mirror-sync/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/behnam0x%2Fdebian-mirror-sync/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32545869,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T12:25:33.646Z","status":"ssl_error","status_checked_at":"2026-05-02T12:24:51.733Z","response_time":132,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","bash","bookworm","bullseye","buster","debian","debmirror","forky","linux","mirrored-repository","offline-repos","sid","stretch","trixie"],"created_at":"2025-11-01T21:01:03.199Z","updated_at":"2026-05-02T18:36:35.161Z","avatar_url":"https://github.com/behnam0x.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌀 Debian Mirror Sync Script\n\nA powerful and interactive Bash script for syncing Debian repositories using `debmirror`. It supports multiple distributions, optional suites, section filtering, custom mirrors, and robust lockfile handling — all with detailed logging and colorful terminal output.\n\n---\n\n## 🚀 Features\n\n- Interactive or automated modes:\n  - `--all`: sync all supported distros\n  - `--manual`: specify a custom mirror URL and codename\n- Supports syncing:\n  - Base distributions: `stretch`, `buster`, `bullseye`, `bookworm`, `trixie`, `forky`, `sid`\n  - Optional suites: `-security`, `-updates`, `-backports`\n- Section filtering:\n  - Choose from `main`, `main,contrib`, or `main,contrib,non-free`\n- Custom mirror URL support for alternative sources\n- Lockfile detection and cleanup to prevent conflicts\n- Excludes large desktop environments and multimedia packages to save space\n- Logs activity to `/var/log/debmirror-update.log`\n- Color-coded terminal output for better readability\n\n---\n\n## 📦 Requirements\n\nEnsure the following dependencies are installed:\n\n- **Bash** (tested on Debian-based systems)\n- **debmirror**\n  ```bash\n  sudo apt install debmirror\n  ```\n- Standard utilities:\n  - `rsync`, `curl`, `awk`, `pgrep`, `tee`, `du`\n\n---\n\n## 🧪 Usage\n\nMake the script executable:\n```bash\nchmod +x debian-mirror-sync.sh\n```\n\nRun interactively:\n```bash\nsudo ./debian-mirror-sync.sh\n```\n\nOr use automation flags:\n```bash\nsudo ./debian-mirror-sync.sh --all\nsudo ./debian-mirror-sync.sh --manual\n```\n\nFollow the prompts to select distros, suites, and sections.\n\n---\n\n## 💾 Disk Space Requirements\n\nEstimated disk usage:\n\n- **Single distro (main only)**: ~50–80 GB\n- **Full mirror (all distros + suites + sections)**: **500–1000 GB+**\n\nActual usage depends on selections and exclusions.\n\n---\n\n## 🌐 Serving the Mirror\n\nTo use the mirrored packages on other machines:\n\n1. Transfer the mirror directory to a server:\n   ```bash\n   rsync -a /Debian-Repository/ user@server:/srv/apt-mirror/\n   ```\n\n2. Serve it via HTTP (e.g., using Nginx or Apache)\n\n3. Add this to client machines:\n   ```bash\n   echo \"deb [trusted=yes] http://your-server/apt-mirror bullseye main contrib non-free\" | sudo tee /etc/apt/sources.list.d/offline.list\n   sudo apt update\n   ```\n\n---\n\n## 📜 License\n\nThis project is licensed under the [MIT License](LICENSE). Feel free to modify and share.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbehnam0x%2Fdebian-mirror-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbehnam0x%2Fdebian-mirror-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbehnam0x%2Fdebian-mirror-sync/lists"}