Email: back up, migrate and restore mailboxes
Connect a mailbox, back it up into cloud storage or to your computer, copy it into another mailbox, and restore a backup into any connected mailbox.
In this chapter
- What the Email page does
- Connect a mailbox
- Back up or migrate a mailbox
- Choosing folders
- What you get: a .mbox backup or a readable archive
- Copy one mailbox into another
- Take only some messages: filters
- Run a backup or migration on a schedule
- Import an Outlook .pst file
- Download a mailbox to your computer
- Restore a backup into a mailbox
- Following a migration, and its limits
What the Email page does
Open Email in the sidebar. The Email migration page has two tabs: Back up or migrate, and Restore a backup. With them you can:
- Back up a mailbox into a cloud folder as .mbox files, the format almost every mail app can import.
- Save a mailbox as a readable archive: a PDF of every message, with the original message and its attachments beside it.
- Copy one mailbox into another, for example Gmail into Outlook.
- Download a mailbox to your computer as a .zip of .mbox files.
- Restore .mbox files from cloud storage into any connected mailbox.
Everything except the download runs on ShiftMyData’s servers in the background. Once a migration has started you can close the page.
Connect a mailbox
A mailbox is connected the same way as a cloud. Open Clouds and press Connect a cloud (or, on the Email page before any mailbox is connected, Connect a mailbox). The mail services are Gmail, Outlook / Microsoft 365 mail, Yahoo Mail, iCloud Mail, Fastmail, Zoho Mail, GMX Mail and Any IMAP mailbox.
- Choose your mail service from the list. Type its name in the search box to find it quickly.
- Type your Email address.
- Type the App password (for GMX, your normal Password).
- Press Connect. ShiftMyData signs in to check the details before it saves them. An account can make 30 of these attempts a day, for mailboxes and clouds together; after that the form says to try again tomorrow.
- Gmail
- Personal Gmail and Google Workspace. Turn IMAP on in Gmail’s settings, and create an app password; that needs two-step verification on first.
- Outlook / Microsoft 365 mail
- outlook.com, hotmail.com, live.com and Microsoft 365 mailboxes. Some organisations switch IMAP off; an administrator can turn it back on for a mailbox.
- iCloud Mail
- Use the full @icloud.com address and an app-specific password created at appleid.apple.com.
- Any IMAP mailbox
- For any other mail host. Fill in IMAP server, Encryption (ssl for port 993, starttls for port 143), Port, Username and Password. Unencrypted connections are not offered, because they would send your password in the clear.
Proton Mail cannot be connected: it only offers this kind of sign-in through an app running on your own computer, which ShiftMyData cannot reach.
Back up or migrate a mailbox
- Open Email and choose the Back up or migrate tab.
- In Mailbox, choose the mailbox to copy from.
- In Into, choose where it goes: one of your clouds, or another connected mailbox.
- Into a cloud, choose Save as: Backup (.mbox) or Readable archive.
- Check Folder at the destination. It starts as Mail backup or Mail archive; type another name to use your own.
- If you only want recent mail, pick a date in Only messages sent on or after.
- Under Folders to migrate, tick the folders you want. ShiftMyData signs in to the mailbox to list them, which takes a moment.
- Press Start backup (for a .mbox backup) or Start migration.
ShiftMyData says “Started. It runs in the background — you can close this page.” The migration appears under Migrations further down the page.
Choosing folders
To begin with, every folder that holds messages is ticked, except folders that only repeat messages kept elsewhere. Gmail’s All Mail, Important and Starred are like that, and are marked duplicates other folders.
- Folders marked no messages are only containers for other folders and cannot be ticked.
- The line beside the buttons counts how many folders are selected. With none ticked, nothing can start.
- If a ticked folder is renamed or removed before the migration runs, it is left out and the others still go.
What you get: a .mbox backup or a readable archive
- Backup (.mbox)
- One file per folder, holding each message whole with its attachments. It imports into Thunderbird, Apple Mail and most mail apps, and it can be restored into a mailbox later. Files are named after the folder, such as INBOX.mbox, and arranged in the mailbox’s own folder structure.
- Readable archive
- A PDF of every message, to read without a mail app. Each is named by date and subject, such as 2024-03-18 Quarterly report [4521].pdf; the number keeps two messages with the same subject apart. The mailbox’s folder structure is kept.
A readable archive has two switches, both on to begin with:
- Save attachments as files
- Each message’s attachments are saved in an attachments folder beside the PDFs.
- Keep the original message (.eml)
- The original message is saved beside its PDF. The PDF is only a picture of the message; the .eml opens in any mail program and loses nothing. Turn it off only to save storage.
A .mbox file grows to a set size (512 MB as standard), then the folder carries on in a second part, INBOX (2).mbox, and so on. Running the same backup again later puts the new mail in the next part rather than rewriting the first. Each part is a complete file on its own, so import all of them.
Copy one mailbox into another
Choose another connected mailbox in Into. There is no format to choose: each message is copied whole, read or unread as it was, and dated as it arrived. A mailbox cannot be copied into itself.
- Leave Folder in that mailbox empty
- Inbox goes to Inbox and Sent to Sent. Folders with a known purpose (Sent, Drafts, Trash, Junk, Archive) go into the destination’s own folder for that purpose, whatever it is called, so Gmail’s Sent Mail lands in Outlook’s Sent Items. Other folders keep their names.
- Type a folder name
- The whole mailbox is kept apart, with its folders as they were, under that one folder.
Running the same migration again copies only what has arrived since.
Take only some messages: filters
Open Filter messages under the folders to take only the mail you want. Leave a box empty and it does not filter.
- From contains
- Part of the sender's address or name, such as `invoices@` or `example.com`.
- To or Cc contains
- Part of an address or name the message was sent to.
- Subject contains
- A word or phrase in the subject.
- Sent before
- With Only messages sent on or after, a date range.
- At least / At most (MB)
- The size of the whole message, attachments included.
- Only messages with attachments
- Skips messages that carry no file.
- Save only the attachments
- Readable archive only. Each attached file goes straight into the folder, named after its message's date and subject, with no PDF or .eml. With From contains and a schedule, this is “save every invoice to my Drive”.
A filtered migration remembers its own progress. Changing the filter later, or running the same folders without one, still sees mail the first filter skipped.
Run a backup or migration on a schedule
- Fill in the form as for a one-off run: mailbox, destination, format, folders and any filter.
- Press Run on a schedule….
- Give it a name and choose when it runs, such as Every night at 02:00. Times are in your time zone.
- Press Save schedule. It appears on the Schedules page with its next runs.
Each run takes only the mail that arrived since the last one, so a nightly backup adds a new part with the day's mail rather than copying the mailbox again. On the Schedules page you can run it now, pause it, change its timing or delete it, as with any schedule.
Import an Outlook .pst file
An Outlook data file (.pst) holds a whole mailbox. Put it in one of your clouds, then open Email and the Import Outlook .pst tab.
- Under .pst file is in, choose the cloud, and type the Path to the .pst, such as `Backups/Outlook.pst`.
- Choose where to save the converted mail: a cloud and a Folder.
- To put the mail into a mailbox as well, choose it under Then restore into mailbox.
- Press Start import.
Each Outlook folder becomes an .mbox file in the folder you chose (`Inbox.mbox`, `Sent Items.mbox`, and so on), which Thunderbird, Apple Mail and most mail apps can import. Calendars and contacts in the file come out as .ics and .vcf files beside them. If you chose a mailbox, a restore starts as soon as the files are saved, and appears in the list below as its own run.
Download a mailbox to your computer
- On the Back up or migrate tab, choose the Mailbox, tick the folders and, if you like, set Only messages sent on or after.
- Press Download to this computer (.zip). Your browser saves a .zip of .mbox files, named after the mailbox and today’s date. Into and the format do not apply to a download.
- The zip is built while it downloads, so a large mailbox can take a long time. Keep the tab open until it finishes.
- Only one download of a mailbox can run at a time. Starting a second says one is already running: let it finish, or cancel it in the browser’s downloads, then try again.
- If the mailbox drops the connection part way, the zip still opens. It contains a file called Backup notes.txt that says where the backup stopped and names any messages that were skipped.
- If you see “This download link has expired or was already used”, start the download again from the page.
Restore a backup into a mailbox
A restore puts the mail in .mbox files from cloud storage back into a mailbox. It works with backups made by ShiftMyData, with Google Takeout exports, and with files exported from Thunderbird or Apple Mail. It is also how to get mail into Outlook: restore into your Outlook.com or Microsoft 365 mailbox, and every Outlook on every device shows it.
- Open Email and choose the Restore a backup tab.
- In Backup in, choose the cloud that holds the backup.
- In File or folder, type the path to one .mbox file, or to a folder of them. Left empty, it uses Mail backup, the folder a ShiftMyData backup goes into.
- In Into mailbox, choose the mailbox. It is never chosen for you.
- Leave Folder in that mailbox (optional) empty to put Inbox into Inbox and Sent into Sent, or type a folder to keep the restored mail apart under it.
- Press Start restore.
Each .mbox file goes into the mailbox folder of the same name, and all the parts of one folder (INBOX.mbox, INBOX (2).mbox and so on) go into the same folder, Inbox first. Folders with a known purpose, such as Sent or Trash, go into the destination’s own folder for it.
Following a migration, and its limits
The Migrations list on the Email page shows each migration and restore: where it went, how many messages it has moved (a restore shows a percentage instead of a total), when it started, any error, and its status (queued, running, paused, succeeded, failed or cancelled). Stop cancels one that has not finished.
Migrations and restores also appear in the Transfers panel, where you can pause and resume them, open their log, and start a failed or cancelled one again. Starting again carries on after the last message written in each folder rather than repeating them.
- A single message over the size limit (50 MB as standard) is skipped and named in the log.
- One run moves up to 20,000 messages as standard. The log says when a run stops at that limit; start the same migration again and it carries on exactly where it stopped.
- A message that cannot be read or saved does not stop the migration: it is noted in the log and the rest carry on.
- The mailbox stays in use while it is copied. Messages deleted meanwhile are simply skipped.
- If the mail server renumbers a folder, ShiftMyData copies that folder again from the beginning rather than risk missing messages.
- If the mailbox refuses to sign in (for example after you revoked the app password), connect it again from Clouds with the same email address and a new app password. ShiftMyData updates the mailbox you already have rather than adding a second one, so its progress is kept.
Try it
Everything here is in ShiftMyData's Help too, once you are signed in. Start free