LinuxCommandLibrary

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 specific label
$ gyb --email [user@gmail.com] --action backup --label-group [label]
copy
Count messages
$ gyb --email [user@gmail.com] --action count
copy

SYNOPSIS

gyb [options]

DESCRIPTION

GYB (Got Your Back) is a command-line tool for backing up and restoring Gmail. It downloads emails as standard mbox format.
The tool uses Gmail API for reliable access. It supports incremental backups, label filtering, and search queries to select specific messages.

PARAMETERS

--email ADDR

Gmail address.
--action ACT
Action: backup, restore, estimate, count.
--local-folder DIR
Local backup directory.
--label-group LABEL
Specific label to backup.
--search QUERY
Gmail search query.
--service-account
Use service account.
--help
Display help information.

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)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community