If you use a Microsoft account, the contacts are synced through that. Emails and calendar events are too. You can backup the rest using a PC. Don't forget to check also if your apps have backup features so you can retain individual apps' data. I forgot to do this when I did a factory reset T_T...