How To Backup Registry In Windows

Any corrupted entries will cause a lot of system problems. Installing unknown applications, manually changing entries, and malware infections can corrupt the registry.

We recommend backing up the registry before updates or making any big changes to your system. You can use some inbuilt tools on your computer to do so. It is also possible to use the command-line interface to avoid the hassle of navigating through the GUI.

How to Create a Backup of Registry

There are a few methods for backing up the registry. Usually, you can use the Registry Editor for selective backups or Task Scheduler and System Restore tool for full backups.

Export Using Registry

There are ways to use the Registry Editor to backup the complete registry. However, doing so and restoring from the backups is somewhat tricky.

You can export the registry keys as REG or hive files.

Before You Begin

Please make sure to keep these things in mind before executing these methods.

REG files are readable text files for exporting and importing registry keys. You can view and edit its contents through a text editor. It is possible to directly merge these files with your registry to change its settings. You can backup your entire registry in a REG file, but there may be issues while restoring the backup.

Hives are database files that contain keys, sub-keys, and values in the registry. You can only view and edit them through the registry editor. They also include the permissions associated with registry entries. So, it’s always better to export the entire registry as hives.

Export as Registry Entries (.reg) 

You can directly export registry keys or sub-keys to REG files from the Registry Editor. Here’s how you can do it:

  1. Launch the Run tool and enter regedit to open the Registry Editor.
  2. Navigate to any branch you want to backup.
  3. Click on File after selecting the branch key or right-click on the key and choose Exportexport branch keys registry editor
  4. Please make sure that the Export range option is set to Selected branch.
  5. Pick the location and the name for the save file. Then click Save to create the backup.

Export as Hive Files

You can find the database files for your system registries inside the %windir%System32\config directory. The registry databases for user files are in the %username% folder.

  1. Open the Registry Editor.
  2. Navigate to the required keys in the Registry Editor and select Export from the File menu.
  3. Set the Save as type to Registry Hive Files (“.”). Name the files according to the instructions below and choose Save.

The backup files and names you need are:

HKLM\BCD00000000 as BCD-Template

Using these names is required to overwrite registry database files while restoring these backups.

Alternative Method Using Command Prompt

You can also use the command-line interface to export registry keys and entries. You are performing the same operations as above but with the command prompt. Follow the steps below to do so:

  1. Open the elevated Command Prompt. Search for cmd on the search bar and run Command Prompt as administrator. 
  2. Type the command REG EXPORT “Registry key” “Filename.REG” and press enter. Replace the respective paths accordingly in the command.  registry backup command

If you want to create a backup of your entire registry, you need to use the REG SAVE command.

For instance, REG SAVE HKLM\Drivers D:\DRIVERS /y. You can replace D:\ with the directory path you want. Make sure to create backups for all the keys mentioned in the previous method.

Creating System Restore Point

The System Restore tool allows creating a snapshot of your system as a restore point. You can revert to this point anytime when your system encounters some problem. This tool naturally also backs up your registry. To create a restore point, follow the steps below:

  • Go to Settings>System>About
  • Click on System protection from under Related settings.
  • Here, click on Create to start the process. Type the description you want and choose the Create option. create restore point
  • Wait for the process to complete.

Use Task Scheduler

The Task Scheduler allows users to schedule and run certain tasks. With this method, you can create a backup for the registry files in the %windir%\System32\configfolder. However, it doesn’t create a backup for the user registry files. Follow these directions to run the registry backup task:

  1. Launch the Task Scheduler by entering taskschld.msc in the Run tool.
  2. Navigate to Task Scheduler Library>Microsoft>Windows>Registry.
  3. Here, right-click on RegIdleBackup and choose Run. run idle registry backup task scheduler

Using Third-party Backup Software

There are some third-party applications that you can use to backup your registry. These applications help avoid the hassle of manually selecting keys for creating backups.

Make sure to read through the reviews and users’ comments for the application before installing it.

Enable Automatic Backup of Registry

Windows automatically backs up the registry by default in the earlier versions. However, you have to enable this setting manually in the newer versions.

You can do so by using the Registry Editor. Follow the steps below:

  1. Open the Registry Editor as mentioned above.
  2. Navigate to the location HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Configuration Manager
  3. Right-click on an empty area and choose New > DWORD (32-bit) Value. create new DWORD registry editor
  4. Set its name as EnablePeriodicBackup and its value as 1. Double click on it to enter the value. enable automatic registry backup

Restart your PC to apply the changes. Please note that the interval between successive backups is ten days. 

How to Restore Registry Backup

There are separate ways to restore the registry backup according to the methods used for said backups.

Selective Backup Recovery

Double-click on the backed-up REG files to restore them. You can also go to File > Import in the Registry Editor and select the REG file.

System Restore

Using System Restore, you can restore your PC to a restore point. Follow these instructions to do so:

  1. Search for restore and open Create a restore point.
  2. In the System Protection tab in System Properties, click on System Restore. system restore
  3. Select the Restore point you created for backup. Then, follow any on-screen instructions.
  4. Wait for the process to complete.

Hidden Automatic Backup Recovery

You need to use the Command Prompt in Windows Recovery Environment to restore the hidden registry backup in your system. Follow these steps to do so:

  1. Start PC with Advanced Startup Options. To do so, go to Settings>Update & Security>Recovery. Then under Advanced startup, click on Restart now.
  2. Select Troubleshoot from the Advanced Options. Select Advanced Options and then Command Prompt.
  3. Enter the following commands:
    • dir (this lists out the files and folders inside C:\Windows\System32. Look for config)
    • mkdir backup
    • copy config backup
    • cd config\RegBack
    • dir (If any file shows value 0, you don’t have a registry backup)
    • copy * ..\*
    • Type y for all when prompted to overwrite.

Hive Files Backup Recovery

To restore the hive backups, you can use a similar method as above. You must manually copy all backup files from the hive file locations to the default database location. Follow the steps below:

  1. Open Troubleshoot>Advanced Options>Command Prompt in the Advanced Startup Options using the above method.
  2. Paste the following command and press Enter: copy D:\BCD-­Template C:\Windows\System32\Config\BCD­-Template /y
  3. You need to use these commands for all the hive files. Replace D:\ with your backup directory.

Add a Comment

Your email address will not be published. Required fields are marked *