I love to automate everything, include my backup processes. PuTTY doesn't have any built-in backup method, so we will export all settings from the registry. If you are just getting acquainted with the program, click here to read the step-by-step guide.
To backup PuTTY saved sessions simply run this command in cmd:
regedit /e "%USERPROFILE%\Desktop\putty.reg" HKEY_CURRENT_USER\Software\SimonTatham
It will save all sessions from PuTTY to your Desktop in putty.reg file.
This command does the job, but why don't automatize this process? :)
Let's automate the PuTTY backup process
- Search for "Task Scheduler" in Start Menu and start it
- Select "Action" / "Create Task"
- Select "General", and type "PuTTY Backup" in the "Name" field (Step #2). Tick the Steps #3 and #4.
Note: The "Name" can be anything
- Go to the "Triggers" panel, and press the "New" button
- Select "On workstation lock" from the drop-down menu (Step #1) and click "OK" (Step #2)
Note: Feel free to select another option, I prefer to save my PuTTY session on workstation lock
- Go to the "Actions" panel, and press the "New" button
- Set these values
- Action: Start a program (Step #1)
- Program/script: regedit (Step #2)
- Add arguments: /e "%USERPROFILE%\Desktop\putty.reg" HKEY_CURRENT_USER\Software\SimonTatham (Step #3)
- Press OK
- Go to the "Conditions" panel, and untick all options
- Press "OK", and test it by locking your Computer (Windows + L). If it works well, you should see the backup file on your Desktop, called "putty.reg"
- If you need to restore your backup, simply open the "putty.reg" file and accept to add to the registry database. Do not forget to relaunch the PuTTY :)
- It's recommended to backup this file somewhere, I prefer to use Dropbox.
If you have a question, feel free to leave a comment below.