{"id":14064448,"url":"https://github.com/countzero/backup_github_repositories","last_synced_at":"2025-07-29T18:32:24.594Z","repository":{"id":42385128,"uuid":"149780232","full_name":"countzero/backup_github_repositories","owner":"countzero","description":"A PowerShell script that automatically backups all remote GitHub repositories to a local directory.","archived":false,"fork":false,"pushed_at":"2023-03-29T19:45:06.000Z","size":18,"stargazers_count":20,"open_issues_count":0,"forks_count":8,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-08-14T07:06:54.886Z","etag":null,"topics":["backup","github","powershell"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","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/countzero.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":"2018-09-21T15:10:52.000Z","updated_at":"2024-06-04T02:29:47.000Z","dependencies_parsed_at":"2024-05-27T23:17:57.481Z","dependency_job_id":"7edb1e33-7f54-48c5-85b9-c079760b9fb8","html_url":"https://github.com/countzero/backup_github_repositories","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/countzero%2Fbackup_github_repositories","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/countzero%2Fbackup_github_repositories/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/countzero%2Fbackup_github_repositories/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/countzero%2Fbackup_github_repositories/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/countzero","download_url":"https://codeload.github.com/countzero/backup_github_repositories/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228040596,"owners_count":17860211,"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","powershell"],"created_at":"2024-08-13T07:03:52.284Z","updated_at":"2024-12-04T03:30:47.328Z","avatar_url":"https://github.com/countzero.png","language":"PowerShell","readme":"# Backup all git repositories from GitHub\nA PowerShell script that automatically backups all GitHub repositories of a user or an organisation to a local directory as a bare Git repository.\n\n## Installation\nDownload and unpack the [latest release](https://github.com/countzero/backup_github_repositories/releases/latest) to your machine.\n\n## Usage\nOpen a PowerShell console at the location of the unpacked release and execute the [./backup_github_repositories.ps1](https://github.com/countzero/backup_github_repositories/blob/master/backup_github_repositories.ps1).\n\n## Examples\n\n### Backup all git repositories of a user\nExecute the following to backup all git repositories of a GitHub user into the subdirectory `./YYYY-MM-DD/`.\n```PowerShell\n.\\backup_github_repositories.ps1 -userName \"user\" -userSecret \"token\"\n```\n\n### Backup all git repositores of a organisation\nExecute the following to backup all git repositories of a GitHub organisation into the subdirectory `./YYYY-MM-DD/`.\n```PowerShell\n.\\backup_github_repositories.ps1 -userName \"user\" -userSecret \"token\" -organisationName \"organisation\"\n```\n\n### Backup all git repositories of a user into a specific directory\nExecute the following to backup all git repositories of a GitHub user into the directory `C:\\myBackupDirectory` and let the script prompt for the user secret.\n```PowerShell\n.\\backup_github_repositories.ps1 -userName \"user\" -backupDirectory \"C:\\myBackupDirectory\"\n```\n\n### Backup all git repositories with a maximum concurrency of 2\nExecute the following to backup all git repositories of a GitHub user into the subdirectory `./YYYY-MM-DD/` with a maximum concurrency of 2 background jobs.\n```PowerShell\n.\\backup_github_repositories.ps1 -userName \"user\" -backupDirectory \"C:\\myBackupDirectory\" -maxConcurrency 2\n```\n\n### Get detailed help\nExecute the following command to get detailed help.\n```PowerShell\nGet-Help .\\backup_github_repositories.ps1 -detailed\n```\n\n## Frequently Asked Questions\n\n### How do I work with a bare repository?\n\nA bare repository only consists of the history and is not intended to be used directly. If you want to work on a specific repository you must first convert it into a non-bare Git repository. That will give you the working tree of a specific branch.\n\nExecute the following to clone the bare Git repository `.\\my_project.git` into a non-bare Git repository `.\\my_project`:\n```Shell\ngit clone .\\my_project.git\n```\n","funding_links":[],"categories":["PowerShell"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcountzero%2Fbackup_github_repositories","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcountzero%2Fbackup_github_repositories","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcountzero%2Fbackup_github_repositories/lists"}