You can use Android Backup Service to back up data connected to one or more of your Google accounts. If you replace your device or erase its data, you can restore your data using the account(s) that you backed up. Swipe down from the Notification bar, then select the Settings icon.
Scroll to, then select Cloud and accounts.
Make sure that Back up my data and Automatic restore are On.
If desired, select Backup account to ensure extra redundancy for backing up your data on the cloud.