This is the Chocolatey package for Got Your Back (GYB), a free and open‑source CLI tool to back up and restore Gmail.
- Upstream project: GAM-team/got-your-back
- License: Apache 2.0
- Current packaged version: 1.95.0
- Chocolatey package: community.chocolatey.org/packages/gyb
choco install gyb
gyb --version
To upgrade when a new version is published:
choco upgrade gyb
To uninstall:
choco uninstall gyb -y
# Count messages in your mailbox
gyb --email you@example.com --action count
# Estimate backup size
gyb --email you@example.com --action estimate
# Perform a full backup
gyb --email you@example.com --action backup --local-folder GYB-Backup
# Restore messages
gyb --email you@example.com --action restore --local-folder GYB-Backup
GYB uses OAuth2 to authenticate with Google. By default it tries to spin up a local webserver on ports 8080–8099 to receive the redirect from Google.
On some Windows systems these ports are blocked by security policies, resulting in errors like:
WinError 10013: An attempt was made to access a socket in a way forbidden by its access permissions
As of version 1.95.0, we’ve patched GYB to automatically fall back to a console‑based OAuth flow when the local server cannot bind:
- GYB prints an authorization URL.
- The browser opens (if possible).
- After granting access, if the browser shows an error page, copy the full URL from the address bar.
- Paste either the full URL or just the
code=...
value back into the console. - GYB exchanges the code for tokens and saves them in
oauth2.txt
.
Once authenticated, credentials are cached and you won’t need to repeat the flow unless tokens expire or are revoked.
- The fallback implementation is tracked upstream in PR #515.
- Changes include:
_wait_for_http_client
now signalslocal_server_failed
instead of crashing.ShortURLFlow
captures scopes in__init__
and uses them in fallback.run_dual
detects failure and switches to manual console OAuth.
- This resolves Issue #370.
- Current maintainer: Foad Farimani
- Former maintainer: Jason Cumiskey (
jtcmedia
)
Community contributions are welcome. Please open issues or PRs against Foadsf/gyb-choco.
Quick tests without doing a full backup:
gyb --email you@example.com --action count
gyb --email you@example.com --action estimate
gyb --email you@example.com --action print-labels
- Always bump the version in
gyb.nuspec
and update checksums when upstream releases. - Validate with:
choco pack choco install gyb -s . gyb --version choco uninstall gyb -y
- Push with:
choco push gyb.<version>.nupkg --source https://push.chocolatey.org/
- Keep moderation guidelines in mind: explicit
<files>
, no dev artifacts, clean PATH/shim handling.