Why is a backup required?
Airmail saves its data on the local disk of the device. It is generally not required to backup the data of Airmail if you are only using Google/iCloud/IMAP/Exchange accounts along with the iCloud to save your app settings. In this case, you can always add the accounts back to Airmail app very quickly using iCloud and Airmail will download all the emails again from the servers.
But it is equally important to do the backup of the Airmail data if you are in someway relying on any local only data.
There are two types of accounts (Local and POP3) which save local only data and the data is corruptible if something goes wrong. Therefore, it is strictly recommended for all users who use local only data, to make timely backups.
Airmail allows you to create local accounts which you can create in
Airmail Preferences > Accounts > + > Add Local Account and these accounts help you if you want to transfer the messages on your hard disk in case you have a limited storage email account. Similarly, Airmail allows you to add accounts using POP3 protocol in Airmail Preferences.
Following are the two ways to backup and restore the Airmail data
If you are using TimeMachine to backup your entire Mac files, then Airmail data will also be automatically backed up. When you restore the TimeMachine backup, Airmail data will be restored too and you can also individually restore the data for only Airmail.
For macOS Sierra 10.12 or earlier, simply restore
~/Library/Containers/it.bloop.airmail2 to the corresponding path on your Mac.
For macOS High Sierra 10.13 or later, you will have to restore the folder which has "Airmail" in its name (2E337YPCZY.airmail is the complete folder name in the example below but it can vary from user to user), as shown in the screenshot below
~/Library/Group Containers/ to the corresponding location on the Mac.
Manual backup and restore
For macOS Sierra 10.12 or earlier, backup/copy the following path
~/Library/Containers/it.bloop.airmail2 and restore it whenever required to the same location.
For macOS High Sierra 10.13 or later, backup/copy the folder which has "Airmail" in its name (2E337YPCZY.airmail is the complete folder name in the example in the above picture but it can vary from user to user), as shown in the screenshot above
~/Library/Group Containers/ and restore it when required to the same location.
Please note that when you restore a backup, the current data from the app will be replaced by the restored data.
Feel free to drop us a question anytime!