How can I preserve the WSL linux environment while doing a Windows 10 system "reset?"

8

1

This post mentions simply restoring the WSL directory partially restored WSL, but with some functionality issues. This post gives generic information for how to back up and recover a linux installation. This post says that %appdata% is in fact moved into your Windows.old folder, which is created after reset and contains your "old" files. ) What information might have gotten lost in the first posters experiment? Are there some registry settings or configuration files that would allow simply restoring the Linux root directory (%USERPROFILE%/AppData/Local/lxss) to work?

EDIT

My question was marked as a duplicate of How to backup (WSL) Linux Subsystem for Windows 10, before system reset or reinstall?.

However that question was only about how to back up the installation--basically tar it and save it somewhere. I explicitly ask about how to restore it.

abalter

Posted 2017-08-25T16:53:14.053

Reputation: 544

As a side note, I recommend using some configuration management tool like chef to store your WSL configuration as a code. This way you can always nuke your current installation and provision it again on a fresh linux image. – Poma – 2017-10-21T18:15:24.050

@Biswapriyo Please see my edit as to why it is not a duplicate. – abalter – 2018-03-04T19:12:21.450

@fixer1234 Once again -- this is how to restore it, not how to back it up. This is not a duplicate question. – abalter – 2018-03-04T23:03:55.600

For those of you who are not familiar with WSL, this is a completely different issue than backing up and restoring a linux partition. – abalter – 2018-03-04T23:04:37.733

1

You may look at this answer

– Jaime – 2018-07-29T06:12:46.557

1@fixer1234 -- can you please remove the flag. As now stated the question is explicitly about how to restore it. Also, the most recent comment links to another answer that is the first I have found that actually addresses that issue. – abalter – 2018-07-30T12:54:30.487

@Jaime -- thanks for the link. Nice that there are some explicit solutions coming down the pipe. – abalter – 2018-07-30T12:55:33.160

2

Possible duplicate of How to backup (WSL) Linux Subsystem for Windows 10, before system reset or reinstall?

– phuclv – 2018-07-31T11:17:18.323

@phuclv You clearly didn't read the post or the discussion above. Please remove the flag. Thank you. – abalter – 2018-08-01T15:20:14.720

well obviously I've read the comments before voting. The other question has the instructions to restore wsl – phuclv – 2018-08-01T15:34:45.043

@phuclv if you look carefully, you will see that Jaime added his answer to that question three days ago, consequently rendering my question a "duplicate." Jaime had to choose which similar questions to answer as he could not post the same answer twice. That is why he linked to his answer to the other question in his above comment. If he had posted his answer here instead, it would have rendered the other question a "duplicate." It is no my fault he added an answer to the other question 3 days ago. Flagging my question as a duplicate makes me look bad, and is not fair. Please remove the flag. – abalter – 2018-08-01T18:22:48.120

No answers