Backing up Signal messages on Mac

I’m using Signal more now and as it’s fully end-to-end encrypted, if something goes wrong with your phone or you lose it, you will lose your entire message history. Signal on Android has an official backup method, but there isn’t one for iPhone or desktop. As a result, a number of backup tools have been written by various people.
The one I’ve had most luck with on my Mac desktop is signalbackup-tools. Note that the Mac Desktop only has data from when you installed it. If you install today, the you will only get up to the last 45 days of messages transferred over from your iPhone.
This works really well and rather helpfully reads the macOS keychain directly for the Signal encryption key, which means that you don’t have it around in your shell’s history or environment.
SQLite database backup
The easiest place to start is to export the database as SQLite:
signalbackup-tools --dumpdesktopdb signal.sqlite
You now have a SQLite database which you can explore at your leisure and is easy to script against.
HTML or text export
Alternatively, you can export as a set of HTML files:
signalbackup-tools --exportdesktophtml signal-html
This will create a signal-html directory that contains a separate folder per chat where the HTML file is nicely styled in a reasonable approximation of the Signal interface.
In addition to HTML, you can export as text using:
signalbackup-tools --exportdesktoptxt signal-txt
This will create a signal-txt directory that contains a plain text file per chat.
Limit by date
In addition, you can use --limittodates <date list> to export messages in a specific date range. For instance, to export just February’s data, you could do:
signalbackup-tools --limittodates "2025-02-01 00:00:00","2025-03-01 00:00:00" --exportdesktophtml .
Final thoughts
I don’t often have a need to go back to message data, but I have looked up things in family conversations before now. This is also a useful reminder that end-to-end encryption doesn’t prevent the person that you’re communicating with keeping a copy of whatever you say.