iCloud backs up your old text messages.
I know when I got my new iPhone 5 all of my conversations from my 4S were there.
I use software that extracted my text messages and converted them to a PDF file. Then I put the file back on my phone. Uses much less space that way and great for archiving. I think it cost $25. Worth every penny.
It's called Phoneview: http://www.ecamm.com/mac/phoneview/whats it called?
and does it put them back into sms app just like before?
It can be done, but it requires either a jailbreak or that you backup your phone to your mac, modify the backup to only contain the sms database, and then restore that backup.