Open rollant opened 4 years ago
WSL save all distros' Registration in regkey. If you lost those keys, it's nearly impossible for new user to recover it.
If the distribution is not registered with WSL, register it. Registration extracts the tar.gz file that is included in your distribution appx.
Because you restored Windows to a point where you didn't install the distro(because it doesn't have registration), so it extracts the tar and re-install it.
WSL provides --import and --export, which are reliable method to handle system restore.
Agree it's a nice feature if we can warning the user before overwrite the linux.
Actually, I can live with having to reinstall the system, but there were few files in my home directory I wish I had a chance to recover first
Ref #5261
Environment
Steps to reproduce
I use Ubuntu launcher from Microsoft store. After I restored system to earlier state due to unrelated problem with recent update, I tried to launch WSL and got message "please wait, installing...". Then I was asked to create an user and afterwards I ended up in empty home directory.
WSL logs:
Expected behavior
WSL should warn people that their installation is unusable and has to be reinstalled, so they'll have a chance to recover any data they may have had in WSL
Actual behavior
My data was overwritten without a warning.
I also noticed that while /home directory was recreated during reinstallaton, some other directories were created long time ago (see screenshot).