In case you use Time Machine Backup to keep things safe on an external drive, then there's an easy way to restore this backup. The same can be done through the Recovery Mode on your Mac. By using the restore option, you'll lose all the changes you have made to the current OS X. Each and everything will be erased, and then the backup will be restored.
So if you are moving ahead with restoring your backup, make sure you again backup your personal files on other partition, or on any other external device. There will be no possible way to recover the data, once the restore is initiated. Assuming that you have backed up and ready to restore your Time Machine Backup, you can now head south to learn the process.
How to Restore Mac Using Time Machine Backup in Recovery Mode
Step #1. Enter the Recovery Mode on your Mac.
Step #2. In the Recovery Mode, click on “Restore from Time Machine Backup.”
Step #3. Now select the external disk or the other partition that contains the backup and click “Continue.”
If the Time Machine backup is created using Time Capsule, then select the Wi-Fi network and then select your Time Capsule. In case the backup is located in network attached storage, then select the network backup disk and click “Connect to Remote Disk.”
Step #4. Wait for a while till your Mac scans the disk, then select the Time Machine Backup and follow on-screen instructions.
I might sound repetitive, but make sure you have backed up your current OS X data, as everything will be wiped off and then the backup will be restored. There won't be any window to get the lost data back.