{"id":26514557,"url":"https://github.com/rubenarakelyan/backup-github","last_synced_at":"2025-03-21T05:18:29.746Z","repository":{"id":277234405,"uuid":"931542746","full_name":"rubenarakelyan/backup-github","owner":"rubenarakelyan","description":"A simple Ruby script to back up GitHub repositories and gists locally","archived":false,"fork":false,"pushed_at":"2025-02-12T20:44:16.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-19T22:08:52.234Z","etag":null,"topics":["backup","github","github-api","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/rubenarakelyan.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},"funding":{"github":"rubenarakelyan","ko_fi":"wackomenace"}},"created_at":"2025-02-12T13:06:07.000Z","updated_at":"2025-03-04T21:47:42.000Z","dependencies_parsed_at":"2025-02-12T21:43:38.146Z","dependency_job_id":null,"html_url":"https://github.com/rubenarakelyan/backup-github","commit_stats":null,"previous_names":["rubenarakelyan/backup-github"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubenarakelyan%2Fbackup-github","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubenarakelyan%2Fbackup-github/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubenarakelyan%2Fbackup-github/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubenarakelyan%2Fbackup-github/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rubenarakelyan","download_url":"https://codeload.github.com/rubenarakelyan/backup-github/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244739946,"owners_count":20501992,"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","github-api","ruby"],"created_at":"2025-03-21T05:18:29.115Z","updated_at":"2025-03-21T05:18:29.739Z","avatar_url":"https://github.com/rubenarakelyan.png","language":"Ruby","funding_links":["https://github.com/sponsors/rubenarakelyan","https://ko-fi.com/wackomenace"],"categories":[],"sub_categories":[],"readme":"# Backup GitHub\n\nA simple Ruby command line script that downloads zip files of all your GitHub repositories and Gists for backup purposes.\n\n## Setup\n\nEnsure you have the correct Ruby version and the `bundler` gem installed. All other gems will be installed automatically the first time you run the script.\n\n## Configuration\n\nRun `ruby backup.rb config --github-access-token GITHUB_ACCESS_TOKEN --backup-directory BACKUP_DIRECTORY`, or copy `config.example.yaml` to `config.yaml` and edit the values.\n\nThe script uses a fine-grained personal access token, which you can create at \u003chttps://github.com/settings/personal-access-tokens/new\u003e.\nSelect \"all repositories\", then give read-only access for \"contents\" (under repository permissions) and read-write access for \"gists\" (under \"account permissions\").\nThe script does not write anything, but there is no read-only permission level for gists.\n\nThe backup directory can be anywhere on your file system that you have write access to, as either an absolute or relative (from the script directory) path.\nA `./backups` directory is provided as a default.\n\n## Running backups\n\nThere are separate commands for backing up repositories and gists.\n\n### Backing up repositories\n\nRun `ruby backup.rb backup-repos`. By default, this will only get public repositories. Add `--private-repos` to also get private repositories.\nFor each repository, the script will download a zip file containing the current state of the default branch.\n\n### Backing up gists\n\nRun `ruby backup.rb backup-gists`. This will get all gists (public and secret).\nFor each gist, the script will download a zip file containing the latest version of all the files in that gist.\n\n## Errors\n\nMost errors are captured and presented with as much information as possible.\n\nIf you start seeing `403` errors, it's very likely that you've hit a rate limit. Try again later, and consider increasing the sleep duration between each request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubenarakelyan%2Fbackup-github","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubenarakelyan%2Fbackup-github","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubenarakelyan%2Fbackup-github/lists"}