Guides

How to back up iMessages on a Mac before they're deleted.

Texts disappear more easily than most people think: a setting that removes old chats, a delete on your iPhone that syncs everywhere, or a Mac low on space. These are 5 ways to keep a copy that stays.

Updated 21 October 2026. For Messages on macOS 26 and later.

Quick answer

First set Messages > Settings > General > Keep messages to Forever. Then keep a copy that doesn't sync: Time Machine backs up the Messages folder with the rest of your Mac, or you can export your chats to files. Messages in iCloud alone isn't a backup, because a delete on one device deletes everywhere.

WayBest forCatch
Keep messages foreverStopping automatic deletesDoesn't protect against your own deletes.
Time MachineA full Mac backupHard to restore one chat. Misses iCloud-only photos.
Copy the Messages folderA quick snapshot, freeCan't be read on its own.
imessage-exporterReadable HTML files, freeTerminal. A snapshot, not ongoing.
TextloreAn archive that keeps savingPaid app after a 14-day free trial.

Why iMessages disappear

  • Keep messages is set to 30 Days or 1 Year. Messages removes conversations and their attachments automatically after that period.
  • Messages in iCloud syncs deletes. Delete a conversation on your iPhone and it's removed from your Mac too.
  • iCloud Backup skips them. Apple says that with Messages in iCloud on, your messages aren't included in your daily iCloud Backup.
  • Your Mac clears space. When storage runs low, macOS removes the Mac's copies of older photos and files and keeps only a preview, with the original in iCloud.

1. Stop Messages deleting old texts

  1. Open Messages, choose Messages > Settings > General > Keep messages and pick Forever.
  2. Open Settings > Apps > Messages > Keep Messages and pick Forever.

This stops automatic removal. It doesn't help when you or someone with your phone deletes a chat, so use one of the ways below as well.

2. Back up the Mac with Time Machine

Time Machine backs up your whole Mac, including the Messages folder in your Library, to an external drive.

  1. Connect an external drive with more free space than your Mac uses.
  2. Open System Settings > General > Time Machine, click Add Backup Disk and choose the drive.
  3. Time Machine backs up every hour while the drive is connected. Leave it plugged in, or connect it often.

Where it falls short

  • Restoring one chat is hard. Your messages live in one database, so getting an old conversation back means restoring the whole Messages folder over your current one.
  • iCloud-only photos are missing. Photos that macOS already moved to iCloud aren't on the Mac, so they aren't in the backup either.

3. Copy the Messages folder to a drive

A quick, free snapshot of everything Messages has on your Mac right now.

  1. Quit Messages so the database isn't changing while you copy it.
  2. In Finder, choose Go > Go to Folder, type ~/Library/Messages and press Return.
  3. Go up one level so you can see the Messages folder itself, and copy it to an external drive or another folder. Name the copy with today's date.

The copy holds chat.db, your message database, and the Attachments folder. You can't open it like a document, but tools such as imessage-exporter can read it later.

4. Export every chat to HTML with imessage-exporter

imessage-exporter is a free, open-source command-line tool that turns your whole history into web pages you can open in any browser, with photos alongside.

  1. Open System Settings > Privacy & Security > Full Disk Access and switch on Terminal.
  2. If you use Homebrew, run brew install imessage-exporter in Terminal. The project's GitHub page has other ways to install it.
  3. Run this command. It writes one HTML file per conversation into a folder on your desktop and copies the attachments, turning HEIC photos into JPEG:
imessage-exporter -f html -c basic -o ~/Desktop/imessage-backup

Open the folder and double-click a file to read the conversation in your browser. Copy the folder to a drive to keep it safe. Run the command again whenever you want a fresh copy.

5. Keep an archive that saves as you go with Textlore

Textlore is a Mac app that keeps its own copy of every message, and of every photo, video and file while it's on your Mac. When Messages later deletes a chat or clears space, Textlore's copy stays. It only reads: it never sends, edits or deletes a message, and nothing leaves your Mac.

  1. Install it. Download Textlore, open it and switch on Full Disk Access when it asks. macOS keeps your Messages history in a protected folder, and this lets Textlore read it. About 100,000 messages import in under a minute.
  2. Leave Keep a local archive on. It's in Settings > Archive, with the archive's size, a running count and a Show in Finder button. New messages are saved within seconds.
  3. Include it in your backups. The archive lives in ~/Library/Application Support/Textlore, so Time Machine backs it up with the rest of your Mac.
The Textlore window: the sidebar, a list of conversations, and a conversation with Jordan open, with photos and messages.The Textlore window: the sidebar, a list of conversations, and a conversation with Jordan open, with photos and messages. Dark appearance.

Everything in the archive stays searchable and can be exported to PDF, HTML, plain text, Markdown or CSV at any time. If your Mac runs low on space, a banner in Settings > Archive shows how much is free, because the archive needs room to save new photos.

If Messages is set to delete verification codes after use, Textlore never archives those messages. Files that were already gone from your Mac and from iCloud before you installed it can't be brought back.

Start keeping every message and photo today. Every feature is free for 14 days. No account, no email, no card.

Questions

Is Messages in iCloud a backup?

No. It keeps your devices in sync, so deleting a message on one device deletes it on all of them. Apple also says that with Messages in iCloud on, messages aren't included in iCloud Backup.

Does Time Machine back up iMessages?

Yes. Time Machine backs up the Messages folder in your Library with the rest of your Mac. Photos that were only in iCloud at the time aren't included.

Where are iMessages stored on a Mac?

In ~/Library/Messages. The messages are in a database called chat.db, and photos and files are in the Attachments folder.

Can I recover iMessages I already deleted?

Only from a backup made before you deleted them, such as Time Machine, a copied Messages folder, or an iPhone backup. Textlore can't bring back messages that were gone before you installed it.

Does Textlore change or delete anything in Messages?

No. It reads a copy of your Messages history and keeps its own archive. It never sends, edits or deletes a message.

Keep every text, for good.

Download Textlore and start your archive today. Free for 14 days.