Can you accidentally erase all the data on an iPhone or iPad, and how do you get it back?
You really can't erase an iPhone or iPad by accident, because several confirmation prompts stand in the way. If you do erase one, restore it from your iCloud or computer backup. With no backup, the data is gone for good.