Backup and restore PuTTY sessions

PuTTY saves the sessions and settings to Windows Registry, the backup can be made with graphical interface via Registry Editor or with Command Prompt.

Keys to backup
All = HKEY_CURRENT_USER\Software\SimonTatham\PuTTY
Sessions = HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions

Backup

Registry Editor
1. Open Registry Editor, press ⊞ Windows key + R and type regedit
2. Browse to the PuTTY key, right click and select “Export”.

Command Prompt
1. Open Command Prompt (cmd.exe) as Administrator and type the following commands.
2. Backup all

regedit /e C:\putty.reg HKEY_CURRENT_USER\Software\SimonTatham\PuTTY

3. Backup only sessions

regedit /e C:\putty-sessions.reg HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\

Restore

Open the saved .reg file or type the import command in Command Prompt ( as Administrator)

regedit /i c:\putty.reg

Backup and restore Windows Firewall rules

There are several ways to backup and restore Windows Firewall rules, different ways for different user needs, the backup can be made via GUI (Graphical User Interface),  CLI (Command-Line Interface) and registry.

Tested operating systems:
Windows 7 x64
Windows 10 x64


GUI

1. Press ⊞ Windows key + R and type wf.msc
2. In “Windows Firewall with Advanced Security” window choose “Action” from main menu.
3. Backup by selecting “Export Policy” submenu, enter the name of the backup file and save.
4. Restore by selecting “Import Policy” submenu, select the backup file with .wfw extension and open.

Windows Firewall GUI backup
Windows Firewall GUI backup

CLI

1. Open cmd.exe (Command Prompt) as administrator and type the following commands.
2. Backup

netsh advfirewall export C:\backup.wfw

3. Restore

netsh advfirewall import C:\backup.wfw
Windows Firewall cmd backup and restore commands
Windows Firewall cmd backup and restore commands

Registry

Backup
1. Press ⊞ Windows key + R and type regedit
2. In “Registry Editor” window navigate to key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\FirewallRules\, right click on “FirewallRules” key and select “Export”,  enter the backup file name and save, the backup file will be saved with the .reg extension for example backup.reg.

Windows Firewall backup with registry editor
Windows Firewall backup with registry editor

Restore
1. Press ⊞ Windows key + R and type regedit
2. In “Registry Editor” window navigate to key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\FirewallRules\, select and delete all string values.

Windows Firewall delete string values from registry
Windows Firewall delete string values from registry

3. Open the backup.reg file and add the values to the registry.