LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

gyb

command-line tool for backing up and restoring Gmail

TLDR

Backup Gmail
$ gyb --email [user@gmail.com] --action backup
copy
Restore emails
$ gyb --email [user@gmail.com] --action restore
copy
Estimate backup size
$ gyb --email [user@gmail.com] --action estimate
copy
Backup only recent messages
$ gyb --email [user@gmail.com] --action backup --search "newer_than:[7d]"
copy
Count messages
$ gyb --email [user@gmail.com] --action count
copy
Fast incremental backup (skip refreshing labels for already-backed-up messages)
$ gyb --email [user@gmail.com] --action backup --fast-incremental
copy

SYNOPSIS

gyb [options]

DESCRIPTION

GYB (Got Your Back) is a command-line tool for backing up and restoring Gmail using the Gmail API over HTTPS.It supports incremental backups, search queries to filter specific messages, and can also restore from mbox exports (e.g., Google Takeout). Backups are stored locally with a SQLite index.

PARAMETERS

--email ADDR

Gmail address.
--action ACT
Action: backup, restore, restore-mbox, estimate, count, purge, print-labels, quota, reindex.
--local-folder DIR
Local backup directory.
--search QUERY
Gmail search query to filter messages.
--fast-incremental
Skip refreshing labels/flags for already-backed-up messages.
--label-restored LABEL
On restore, additionally apply this label to all messages.
--strip-labels
Remove existing labels during restore.
--spam-trash
Include Spam and Trash folders.
--service-account
Use Google Service Account authentication.
--help
Display help information.

INSTALL

brew install gyb
copy
nix profile install nixpkgs#gyb
copy

CAVEATS

Requires OAuth authorization. Rate limited by Gmail API. Large mailboxes take time.

HISTORY

GYB was created by Jay Lee as an open-source Gmail backup tool, widely used for Google Workspace migrations.

SEE ALSO

offlineimap(1), mbsync(1), mutt(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid