Signal doesn't make it easy to export or backup message history. While I've not found any way to export history from a non-jailbroken iPhone, you can extract your messages from Signal Desktop.

Inspired by a great discussion on GitHub, I wrote a small utility that creates an archive of your Signal Desktop message history, stripping the encryption from the SQLite database to make it easier to work with. It also generates JSON for each table in the database for super-easy scripting.

I'll probably update the script in the future to ensure it works on Linux as well. Longer-term, I'd love to come up with an easy way to view the messages.