I thought I would share this, as I have found it to be invaluable. I have a lot of extremely important and relevant text messages which relate to my separation. One thing that I have been terrified of is losing my telephone, or it becoming damaged.
I use an Android phone, and found an app that backs up your call log and SMS message history to your gmail account. That way they''ll never be permanently lost. The app that I used is called SMS Backup+. I have also used an app called SMS Backup and Restore, which allows you to restore a copy of your text messages (either on a new phone if yours becomes broken, or on the same one if you accidentally delete a message). Both of them are free.
I have no idea about iPhone apps, I''m afraid. If anyone knows of any more useful apps please let me know!
Also look at Go SMS Pro (android). This has a message archive facility. I was relying on SMS Backup but it seems to have lost about 1500 messages from my ''ex-wife'' i wanted to keep for future reference.