You can back up messages on an iPhone to your iCloud account, or sync messages from your iPhone to your Mac.
You can backup your iPad to iCloud or your computer through iTunes with these simple steps.