Skip to content

Back up your email ​

This tutorial walks you through a first backup. You create an archive on your computer, add your email account, and copy all your mail into the archive.

You need the command line only to build mailarc. Everything else happens in the mailarc desktop app.

What you need ​

  • A computer with macOS, Linux or Windows.
  • Your email address, password and your provider's IMAP server name. Your provider's help pages list the server name, often as "IMAP settings".
  • Enough free disk space: plan for about twice the size of your mailbox. The archive keeps your mail compressed, but adds a catalog, logs and a search index.
  • An Internet connection that stays up during the first download.

Not available yet: installers. You build mailarc from its source code for now. Installers for each system are planned.

Step 1: Build mailarc ​

Follow Install mailarc to install the tools. Then, in the mailarc source folder, build the command line tool and the desktop app:

sh
cargo install --path apps/cli --locked
deno task --config apps/reader/web/deno.json ci
cargo build --release -p mailarc-desktop-app

The first command installs mailarc, which you use later to check your archive. The last one creates the desktop app at target/release/mailarc-desktop (mailarc-desktop.exe on Windows).

Step 2: Create your archive ​

An archive is one folder that holds all your mail.

  1. Start the desktop app:

    sh
    target/release/mailarc-desktop
  2. Choose Create archive….

    The desktop app's start screen with Open archive… and Create archive….

  3. Choose where the archive goes and its name, for example Archive.mailarc in a Mail folder in your home folder. Pick a disk that your regular backup covers.

  4. Choose Save.

The app creates the archive and opens it. The archive is ready for email accounts and for search right away.

  • mailarc never overwrites a folder. If the name is taken, choose another one.
  • A name without the ending .mailarc gets it added.

Step 3: Find your way around ​

The window shows your archive. It is empty for now. The top bar has two buttons: Accounts and Sync now.

The desktop app with an archive open. The top bar shows Accounts and Sync now; the left column lists folders.

Next time, open the archive from Recent archives on the start screen, or start the app with it:

sh
target/release/mailarc-desktop --archive ~/Mail/Archive.mailarc

Step 4: Add your email account ​

  1. Choose Accounts in the top bar.
  2. Choose Add an account.
  3. Choose Another server, with a password.
  4. Fill in the form:
    • Protocol: IMAP.
    • Server: your provider's IMAP server, for example imap.example.com.
    • Encryption: TLS. Choose STARTTLS only if your provider says so.
    • Port: leave it empty. mailarc uses 993 for TLS and 143 for STARTTLS.
    • User name: usually your full email address.
    • Password: your email password, or an app password (see below).
    • Name in the archive: optional, for example "Personal".
  5. Choose Add account.

The Add an account form with IMAP, a server, a user name and a password filled in.

mailarc stores the password in your system's keychain: the macOS Keychain, the Windows Credential Manager, or the Secret Service on Linux. The password never goes into the archive or a file.

Every connection is encrypted, and mailarc checks the server's certificate. It never falls back to an unencrypted connection.

Gmail, Outlook and app passwords ​

  • Gmail: use the server imap.gmail.com and an app password. Create it in your Google account under Security, App passwords. This needs 2-Step Verification.
  • Outlook.com and Microsoft 365: password sign-in is usually turned off. Use Microsoft in step 3 instead. It needs an app registration of your own for now; see Sign in with Google or Microsoft.
  • Other providers: many require an app password when you use two-factor sign-in. Your provider's help pages explain how to create one.

Step 5: Test the connection ​

Choose Test next to your new account. mailarc signs in and counts the folders on the server. It changes nothing.

The Accounts screen. The account shows "Signed in: 7 folders on the server."

If the test fails, the screen says why. Check the server name, the user name and the password. See Troubleshooting for the error messages.

Step 6: Copy your mail into the archive ​

  1. Choose Sync next to the account, or Sync now in the top bar.
  2. Tick Keep the computer awake until the sync ends. A computer that falls asleep stops the download.
  3. Choose Start sync.

The Sync screen with the options Include Spam, Include Trash and Keep the computer awake.

mailarc first counts the new messages. Then it shows how many it archived, and an estimate of the time left.

A running sync: 2,640 of 9,571 new messages archived.

  • The first sync takes a while. How long depends mostly on your internet connection and your provider. Later syncs fetch only what changed.
  • Spam and Trash are skipped. Tick Include Spam or Include Trash to archive them too.
  • While the sync runs, you cannot browse the archive. The window shows the progress instead.
  • Stop ends the sync safely. Everything archived so far stays. The next sync continues where this one stopped.
  • Closing the laptop lid or choosing Sleep still sends the computer to sleep. Keep the lid open during a long first sync.

When the sync ends, mailarc updates the search index and reports the result.

The finished sync: "Archived 9,571 new messages from 1 account."

Choose Back to the archive to browse your mail.

Step 7: Check your backup ​

  • Browse: your folders appear in the left column. Click a folder to list its messages.
  • Search: type in the search field, for example from:anna invoice. See Searching.
  • Statistics: choose Statistics in the left column. It shows how many messages you have, from which years, and how much space they take.

The Statistics page with totals, messages by year, and folders.

mailarc never deletes or changes mail on the server. It does not even mark messages as read. Mail that you delete on the server later stays in your archive.

Step 8: Keep your backup up to date ​

Each sync fetches only new and changed mail, so later syncs are quick. You can sync by hand or on a schedule.

  • By hand: open the app now and then and choose Sync now.
  • On a schedule: choose Accounts, then set Sync automatically to Every hour, Every 6 hours or Once a day. Your system then syncs the archive, also while the app is closed. While the app is open, it syncs a due run itself once you have not used it for 5 minutes. See Sync automatically.

Not available yet: syncing on a schedule from the app on Windows (planned).

Step 9: Protect your archive ​

Your archive is now the only copy of mail that you delete on the server. Treat it like other important files:

  • Back it up. Include the archive folder in your regular backup. Copy it while no sync runs. See Backups.
  • Keep a second copy elsewhere, for example on a flash drive. See Take your archive on a flash drive.
  • Check it now and then. mailarc verify ~/Mail/Archive.mailarc reads every stored message and confirms that nothing changed.
  • Mind who can read it. The archive is not encrypted. Anyone who can open the folder can read your mail.

Not available yet: encrypting the archive. It is planned for after version 1. Until then, store copies on encrypted disks, for example with FileVault, BitLocker or LUKS.

Where things are stored ​

WhatWhere
Your mailThe archive folder, for example ~/Mail/Archive.mailarc
Account settings (server, user name, no password)mailarc/accounts/ARCHIVE_ID.json in your system's settings folder; see Where the settings live
PasswordsYour system's keychain

Back up the account settings file too if you want to restore the setup on a new computer. Passwords stay behind in the old computer's keychain: on the new one, choose Replace password… for each account.

Next steps ​