To ensure your data is safe, use the backup feature in your phone. Your device data (such as Wi-Fi passwords and call history) and app data (such as settings and files stored by apps) will be backed up remotely.
Switch on automatic backup
1. Tap Settings > Backup & reset, and switch Back up my data to On
2. Tap Backup account to select to which account your data will be backed up.