Locally back up Gmail messages using Gmail’s API over HTTPS. More information: https://github.com/GAM-team/got-your-back.
gyb --email [email protected] --action estimate
gyb --email [email protected] --action backup --local-folder path/to/directory
gyb --email [email protected] --search "is:important OR is:starred"
gyb --email [email protected] --action restore --local-folder path/to/directory