For backing up your email from gmail or any other provider, check out MailStore Home edition: https://www.mailstore.com/en/products/mailstore-home/ It will grab everything in the account and store it locally, and then allow you to push it back onto any other imap service when necessary. Great for migrating your email, and keeping a just-in-case backup.
https://www.mailstore.com/en/products/mailstore-home/
Downloads email from most providers, allows for local (text) searches, and to upload it again to an imap provider.