Skip to main content

Got Your Backup - Backup Gmail

·1 min

I use Got Your Back to backup my Gmail emails every night.: I stopped using GYB because the credentials it uses stop working after 7 days for regular Gmail accounts. I switched to OfflineIMAP instead.


Here are some helpful commands:

# Initial setup.
./bin/gyb/gyb \
    --email [email protected] \
    --local-folder /srv/dev-disk-by-uuid-28fd4901-c675-430d-be16-e1ffddc50727/Backups/GYB-GMail-Backup/[email protected] \
    --action create-project

# Quick way to test if everything is setup as expected.
./bin/gyb/gyb \
    --email [email protected] \
    --local-folder /srv/dev-disk-by-uuid-28fd4901-c675-430d-be16-e1ffddc50727/Backups/GYB-GMail-Backup/[email protected] \
    --action estimate

# Backup. Omit the last term to backup everything.
# The last three parameters are optional to speed things up or make them run in less-memory environments.
/home/pi/bin/gyb/gyb \
    --email [email protected] \
    --local-folder /srv/dev-disk-by-uuid-28fd4901-c675-430d-be16-e1ffddc50727/Backups/GYB-GMail-Backup/[email protected] \
    --action backup \
    --search "newer_than:7d" \
    --memory-limit 100 \
    --batch-size 4

Other tools that I checked but didn’t use: