What should I do if my hard drive is going bad?
Answer: First of all, I hope you already have a backup of all your data!
If not, you should use Windows Backup and Restore (for Windows) or Time Machine (for Mac) to automatically back up your data to another hard drive. Both of these backup programs can be used to create an "image" of your hard drive, meaning you can restore the entire hard drive if needed.
However, if your hard drive is already having reliability issues, it is possible some files may be corrupted. If you perform a full restore, you may end up copying corrupted system files to your new drive, which may cause problems. In this case, it may be best to manually copy your user folder to another disk, such as an external hard drive. You can then replace your failing hard drive with a new one and reinstall the operating system from your computer's installation disc(s).
Important: The operation described above is called a "clean install." It will create a fresh, uncorrupted installation of your system, but will not include any of your personal files. Therefore, it is crucial that you back up your personal data first.
If you decide to perform a clean install, you will need to copy the backup of your user folder to the new hard drive. This will put all your personal data back on your new hard drive. However, you will still have to reinstall your applications, which may take some time. Therefore, it is smart to make a list of third party applications you have installed on your system before performing a clean install.
To summarize, the easiest way to restore your data is to perform a full restore from a complete system backup. However, if you have corrupted files on your hard drive, a clean install may be the best option. Just make sure you have a least one backup (preferably two or more) before performing a clean install, or you will lose your personal data.