Skip to main content

Backup a GitHub organization or user: repos, issues, and pull requests

Project description

gh-backup

Backup a GitHub organization or user: repos, issues, and pull requests.

Clones all repositories with full git history and exports issues/PRs as JSON, then compresses everything into a .tar.zst archive.

Requirements

  • uv
  • GitHub CLI (gh) — authenticated with a token that has repo and read:org scopes

Setup

make install

This installs dependencies and sets up pre-commit hooks.

Authentication

gh-backup auth

Checks that gh is authenticated and reports the active account and token scopes.

Usage

Export an organization

gh-backup export myorg --output /backups

Export a user account

gh-backup export myusername --type user --output /backups

Common options

Option Description
--output PATH Directory to write exports into
--workers N Parallel clone workers (default: 4)
--repos NAME Only export specific repos (repeatable)
--skip-issues Skip issues and pull request export
--no-compress Keep raw export directory, skip archiving
--keep-dir Keep uncompressed directory after archiving
--format Archive format: zst (default) or gz
--verbose Enable debug logging

Examples

# Export an org with more workers
gh-backup export myorg --output /backups --workers 8

# Export specific repos only
gh-backup export myorg --output /backups --repos frontend --repos backend

# Export a user, skip issues, no compression
gh-backup export myusername --output /backups --type user --skip-issues --no-compress

Each run is saved to a timestamped subdirectory under the output directory, then compressed into a single archive.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gh_backup-0.1.1.tar.gz (65.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gh_backup-0.1.1-py3-none-any.whl (24.6 kB view details)

Uploaded Python 3

File details

Details for the file gh_backup-0.1.1.tar.gz.

File metadata

  • Download URL: gh_backup-0.1.1.tar.gz
  • Upload date:
  • Size: 65.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for gh_backup-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c1534532a65664eb8c52ed97da909a5cc0c3cee1bda26a85daa49f1b374007c9
MD5 5037d58aee9ef87f39a93cb35c70fb0f
BLAKE2b-256 f4e70407798cd191ce05a3041fc685f7290a1d9ec8b552ad8ba63a94e19c5458

See more details on using hashes here.

File details

Details for the file gh_backup-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: gh_backup-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 24.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for gh_backup-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 31e35b9998410ce629c097093d8fb4cf7c917b251050b82ef48ae8e7a63675df
MD5 b0827964598becd97ac3ff826493384c
BLAKE2b-256 8cadec6a8e5cd6231466b7ed998ed2114f6b9c00bbefaf509500c8b08ce48024

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page