If you intend to reinstall your operating system, your Keybase device configuration must be backed up otherwise you will lose the device. The impact of this may be so harmful that it can lead up to an account reset, which makes you lose all kbfs files, teams, devices and more. Even worse, stuff like teams, device names are permanent and as such cannot be reused. Best of all, I found zero documentation anywhere on the web about how to make a backup of your valuable device configuration. Thereby this is for keybase/client git:
Grab it all, this includes chat databases and more (not GPG):
%userprofile%\AppData\Local\Keybase %userprofile%\AppData\Roaming\Keybase
Replace “username” with your own Keybase username:
%userprofile%\AppData\Local\Keybase\username.ss %userprofile%\AppData\Local\Keybase\config.json %userprofile%\AppData\Local\Keybase\secretkeys.username.mpack %userprofile%\AppData\Local\Keybase\session.json
Lucky225 reported that in newer versions of Keybase the following files are needed:
%userprofile%\AppData\Local\Keybase\username.ss2 %userprofile%\AppData\Local\Keybase\username.ns2 %userprofile%\AppData\Local\Keybase\config.json %userprofile%\AppData\Local\Keybase\secretkeys.username.mpack
Since developers may be changing the format and locations of configuration files, I can only recommend you backup the installer of the Keybase version you were using at the time of the backup. So you can restore with the same version and then update later. Do I need to mention that your backup better be well encrypted and safely stored?
Reinstall Keybase. If Keybase has been automatically started, click the Keybase tray icon and select Quit from the preferences icon in the Keybase client (quitting the main window is not sufficient). Then open Task Manager and kill the following processes in this order:
keybase.exe kbfsdokan.exe
Copy over the following files from your backups, where “username” was replaced with your own Keybase username:
%userprofile%\AppData\Local\Keybase\username.ss %userprofile%\AppData\Local\Keybase\config.json %userprofile%\AppData\Local\Keybase\secretkeys.username.mpack %userprofile%\AppData\Local\Keybase\session.json
Lucky225 reported that in newer versions of Keybase the following files are needed:
%userprofile%\AppData\Local\Keybase\username.ss2 %userprofile%\AppData\Local\Keybase\username.ns2 %userprofile%\AppData\Local\Keybase\config.json %userprofile%\AppData\Local\Keybase\secretkeys.username.mpack
Restart Keybase. You may see a “Login” button, if you see one then just click it. Either way you will be logged into your Keybase account automatically using your previous device configuration. Restoring chat databases, imported keys and other stuff is outside the scope of this document, it just handles restoring your previous device so you are not losing it. If you created a full backup as stated above and fiddled with restoring further relevant data - and you would like me to extend (or correct) this document, feel free to msg Chotaire on Freenode or Keybase.