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.
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.
| Way | Best for | Catch |
|---|---|---|
| Keep messages forever | Stopping automatic deletes | Doesn't protect against your own deletes. |
| Time Machine | A full Mac backup | Hard to restore one chat. Misses iCloud-only photos. |
| Copy the Messages folder | A quick snapshot, free | Can't be read on its own. |
| imessage-exporter | Readable HTML files, free | Terminal. A snapshot, not ongoing. |
| Textlore | An archive that keeps saving | Paid 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
- Open Messages, choose Messages > Settings > General > Keep messages and pick Forever.
- 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.
- Connect an external drive with more free space than your Mac uses.
- Open System Settings > General > Time Machine, click Add Backup Disk and choose the drive.
- 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.
- Quit Messages so the database isn't changing while you copy it.
- In Finder, choose Go > Go to Folder, type
~/Library/Messagesand press Return. - 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.
- Open System Settings > Privacy & Security > Full Disk Access and switch on Terminal.
- If you use Homebrew, run
brew install imessage-exporterin Terminal. The project's GitHub page has other ways to install it. - 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.
- 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.
- 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.
- 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.


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.
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.