The registry is the database that contains all the configuration options and settings for the Windows OS. Most of the virus directly attack the registry . Also some time we ourselves try to tamper with the registry. So it is were necessary to back up the registry.
Follow the following steps
Step 1 : Press 'windows+r' . Type 'regedit' .Press enter.
Step 2 : Select Computer at the top as shown.
Step3 : Now File -->Export. Give a filenamre 'backup' . Save it.
Thus we have backup of registry.
To restore the registry
Step 1 : Press 'windows+r' . Type 'regedit' .Press enter.
Step2 : Now File -->Import . And import the 'backup' file saved above