If you use Gmail or hosted Google Apps, you might be interested in taking a backup of your data, such as emails, Drive documents, and calendar entries. Thankfully, you can usually export copy of your account data using Google Takeout.
If your hosted Apps account has Takeout disabled, then you can do a backup, it simply has a few extra steps.
Option 1: Google Takeout
This method is nice and simple. Simply go to the Data tools - Download your data page, and select which services you want to export:
It can be a bit eye-opening to see the amount of data Google has on you (Files, conversations, location history, etc). At this point, click through to “Prepare Download”. Depending on the size of your account, this may take the duration of a coffee break, a few hours, or even an entire day.
If you check the box for it, you’ll get an email like this when your Download completes:
And this lets you fetch a single file:
The .zip
file contains a series of folders, one for each service. The defaults seem to be:
- A unix
mbox
file - Calendar
- One iCal file for each calendar
- Contacts
- One vCard file for each group.
- Drive
- Exports as PDF, docx, xlsx
Option 2: Export data from each service
Sometimes, Google Takeout isn’t an option.
Mst Google services have some sort of data connection for apps to use, which can be used for export. This means if you have a new contact manager, or want to include your Google Drive in your PC backup, then there are still some options to do so.
The export formats in these examples should match the Google Takeout defaults. I’ve written up a brief guide below for each of the following services:
- Contacts
- Calendar
- Drive
If you are not a power user, then a good option would be to set up a copy of Mozilla Thunderbird to use IMAP, and regularly using it for your email. This is a simple way to keep a clone of your inbox on your desktop computer, so that it can be included in backups.
If you are more tech-savvy, then the rest of this section will focus on helping you generate an mbox
file containing a full backup of your email, the same format as Takeout uses. The best tool for that is a Linux program called getmail.
On Debian or Ubuntu Linux, issue this command to install getmail:
|
|
For other package managers, see these directions.
First, you need to enable IMAP for your account, see Google’s article: Get started with IMAP and POP3, for the steps.
Now create a file at ~/.getmail/getmailrc
, and configure it to read your email account via IMAP/SSL.
|
|
Then run:
|
|
After some time, you will end up with a large mbox
file at ~/inbox
, containing all of your mail.
If, for some reason, you need to use POP3 instead, then see this article on Gmail backup
Contacts
Go to your contacts, and find a group. Check the box next to each name, and then find the Export button:
Select the vCard format here, as it’s the same format which Takeout would have used:
Calendar
Google provides a share-able iCal link, which you can download once, but it is only available if your calendar is public.
So, if your calendar isn’t too sensitive, click “Share” and make the calendar public:
Go to “Calendar Settings”, find the iCal link. It may take a few minutes for the link to start working, but once it does, download it, and then turn off public sharing.
There is a chance that somebody else loads your calendar while its public. An alternative which avoids making the calendar public would be to save the events individually instead.
Drive
Exporting from Google Drive is nice and simple. Select all of your files (Shift+Click):
And then find the Download button:
If you apply this to your whole drive, it may take a while, so you may wish to download it in parts if your Internet can be unreliable.
How do I use these files?
Google Drive’s files are exported in familiar formats. If you haven’t used an mbox
, vCard
or ics
file before, then you will need to find a program which can read these for you.
Google’s support answer “Download your data: Per-service information” contains a list of files types which you’ll run into during this process, and suggests programs which can import them.