Hacker News new | ask | show | jobs
by rendaw 1178 days ago
How do you back up emails?
5 comments

I use google take out to do a dump of email and back up the download file. In order to clear out a bunch of space on my gmail account, I did a full export and then deleted conversations based on date. I ended up having to use a script which ran over a few days, due to limits on how fast I could access messages. This was all to avoid signing up for a paid account.

https://takeout.google.com/

Excellent question and not one I’ve bothered to solve, and you’ve pointed out a gaping hole in my backup plan.

If I had to decide now, I’d say setting up a server that pulls my email in with IMAP and saves it to a backup drive. Of course that means making sure spam and marketing emails I don’t want aren’t backed up, so maybe I mark them somehow as back up targets?

It’s an excellent question and I don’t have a good answer. And it’s worth pointing out that emails are just as important as photos when you think of correspondence from friends, family, business contracts, attachments, links and their contents, etc to forever. The network effect is very real and I’m not sure how to handle all of that.

I still use POP3 to this day because the very nature of the protocol means I keep local copies of all my emails.

It's still my responsibility to properly backup my local copy of the emails, of course, but that's easy.

I use IMAP to read emails, but back up emails by running tar in my server's /var/mail folder and scping the file to my backup drives.
I use mbsync to sync gmail to a mail folder on a local drive, and then backup the mail folder onto a network drive using rsync, and then sync every 24 hrs to a onedrive folder using rclone,
Don't know why everyone doesn't do that!
https://github.com/djipko/gbackup-rs

Produces an SQLite database.