Linux command
gyb 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Backup Gmail
gyb --email [user@gmail.com] --action backup
Restore emails
gyb --email [user@gmail.com] --action restore
Estimate backup size
gyb --email [user@gmail.com] --action estimate
Backup only recent messages
gyb --email [user@gmail.com] --action backup --search "newer_than:[7d]"
Count messages
gyb --email [user@gmail.com] --action count
Fast incremental backup
gyb --email [user@gmail.com] --action backup --fast-incremental
说明
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.
参数
- --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.
FAQ
What is the gyb command used for?
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.
How do I run a basic gyb example?
Run `gyb --email [user@gmail.com] --action backup` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --email _ADDR_ do in gyb?
Gmail address.