Hi
Go to settings down to reset Reset back to factory settings
After reset set back up over your wifi when it asks if you want tto use iCloud backup Say yes to get your apps and data back
When you charge an iphone /ipad it automatically backs up to iCloud Over your wifi.
Cheers
Brian