You can't unless you modify the source code directly.
Normally you would have messages written to either a nfs mounted redundant storage system or use imap storage and various imapsync tools.
I assume you are already using asterisk realtime to store config in a database so you can use mysql in active/standby mode?