{"id":21687060,"url":"https://github.com/vankesteren/githubmirror","last_synced_at":"2026-04-11T11:05:18.877Z","repository":{"id":220938157,"uuid":"752809409","full_name":"vankesteren/githubmirror","owner":"vankesteren","description":"Shell script to back up all GitHub repositories you own","archived":false,"fork":false,"pushed_at":"2024-02-05T12:42:57.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-25T12:26:46.381Z","etag":null,"topics":["backup","github","linux","mirror","nas","shell-script","synology-nas"],"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/vankesteren.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}},"created_at":"2024-02-04T21:19:15.000Z","updated_at":"2024-02-07T10:51:11.000Z","dependencies_parsed_at":"2024-11-25T16:46:46.348Z","dependency_job_id":null,"html_url":"https://github.com/vankesteren/githubmirror","commit_stats":null,"previous_names":["vankesteren/githubmirror"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vankesteren%2Fgithubmirror","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vankesteren%2Fgithubmirror/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vankesteren%2Fgithubmirror/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vankesteren%2Fgithubmirror/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vankesteren","download_url":"https://codeload.github.com/vankesteren/githubmirror/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244609460,"owners_count":20480782,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["backup","github","linux","mirror","nas","shell-script","synology-nas"],"created_at":"2024-11-25T16:35:32.437Z","updated_at":"2025-10-25T04:31:39.663Z","avatar_url":"https://github.com/vankesteren.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub mirror\n\n![GitHub License](https://img.shields.io/github/license/vankesteren/githubmirror) ![GitHub file size in bytes](https://img.shields.io/github/size/vankesteren/githubmirror/githubmirror.sh)\n\n🪶 A lightweight, legible bash script to keep a copy of all your GitHub repos. The `githubmirror.sh` script does the following:\n\n- 🔏 Read your [Personal Access Token](https://github.com/settings/tokens?type=beta) from a local file.\n- 🔗 Connect to the GitHub API to find all the repos of which you are an owner (even private ones!).\n- 🗃️ Clone repos into the folder `\u003cgithub_username\u003e/\u003crepo_name\u003e`. If it already exists, `git reset` it to ensure the exact same state as GitHub.\n- 📜 Write nice logs along the way.\n\n## Installation\n\nTo set up githubmirror on your own linux system:\n\n1. Ensure you have a recent version of the dependencies installed: [`curl`](https://curl.se), [`jq`](https://jqlang.github.io/jq/), and [`git`](https://git-scm.com/).\n2. Clone this repository\n3. Request your [Personal Access Token](https://github.com/settings/tokens?type=beta) and store it in a plain file called `pat.txt`.\n3. `chmod +x ./githubmirror.sh`\n4. Set up a weekly recurring task (via `cron` or via your OS's task scheduler) to run the script. To run the script while keeping logs, I recommend the following:\n   ```bash\n   # run gitmirror, pipe stdout and stderr to log file\n   ./githubmirror.sh \u003e\u003e \"logs/$(date +'%Y%m%d').log\" 2\u003e\u00261\n   ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvankesteren%2Fgithubmirror","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvankesteren%2Fgithubmirror","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvankesteren%2Fgithubmirror/lists"}