You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ubuntu Subsystem Backup and reinstall in new/clean win10 Installation #2955
i can get one yes. but my plan was to backup the complete "CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc" folder in a zip file, upload it on my cloud and download it on my other computer. then i install ubuntu from the App-Store and repleace the folder.
you think this can work? and what is with permissions then? they are all broken after i did this?
@BamiGorengo - Please avoid spelunking around in WSL's folders - there be dragons!
Also, the folder you were proposing copying between machines contains the entire userspace - this is overkill and is unlikely to work well as a backup mechanism.
Rich Turner (@bitcrazed) One can fix the permission with NtSetEaFile() function. This LXATTRB extended attribute can be added to wsl.exe so that user can fix file/folder/hard link permissions.
It's not just about permissions. There are other potential issues caused by unexpected file locking semantics, etc. We are working to improve Windows --> Linux filesystem interop in future releases and, in the meantime, encourage users to avoid spelunking into the Linux filesystem via Windows and Windows apps/tools.
Today, the only place we support installing WSL distros on Client OS' is to the locations controlled, managed, and configured via the built-in infrastructure.
While you MIGHT be able to install distros elsewhere, you do so at your own risk ;)
Similarly, I don't believe we support installing distro's to magnetic tape drives, Hollerith punched card machines, or Jacquard looms ;)
The Problem is that my english is really bad, i cant follow all informations that i get in replys in this issue... And when i need to google to solve to much terminal and linux permission problems that i dont understand... it will ends in chaos :D The only way is a "drag & drop" solution. i checked docker because i hoped that i can mount that image so easy like mounting images with deamon tools... but that seems not so easy like i hoped... ;P
If anyone wonders more about this, I've installed WSL on a virtual drive through the server installation method on Windows 10. It's been running without any problems since July 2018. I have the drive automount at computer start. As far as I've seen Windows is not depended on any WSL services before the automount. I will reinstall a clean Windows at the coming Windows update, so I will have to find a way to reattach my WSL drive. The virtual drive file can without issue be moved anywhere, backed up etc, even mounted from your network. The file is currently ~5GB.
C:\Users\ariel>wsl --help
Usage: wsl.exe [option] ...
Options:
-d, --distribution <DistributionName>
Launch the specified distribition.
-e, --exec <CommandLine>
Execute the specified Linux command. The remainder of the arguments are
used as the command line to execute.
-u, --user <UserName>
Run as the specified user.
--help
Display this usage information.
--
Stop parsing arguments and pass the remainder to the Linux process.
Activity
fpqc commentedon Feb 15, 2018
It's suggested to backup your user home directory and then reinstall, copy the home back in, and fix the permissions.
SvenBudak commentedon Feb 15, 2018
Is there any way to let the permissions autofix? i am not really good with linux. i am happy that i make it running on this one machine ;)
Biswa96 commentedon Feb 15, 2018
@BamiGorengo Do you have any external HDD or SSD? I've some idea.
SvenBudak commentedon Feb 15, 2018
i can get one yes. but my plan was to backup the complete "CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc" folder in a zip file, upload it on my cloud and download it on my other computer. then i install ubuntu from the App-Store and repleace the folder.
you think this can work? and what is with permissions then? they are all broken after i did this?
fpqc commentedon Feb 15, 2018
no, zip will kill the permissions 🙄
SvenBudak commentedon Feb 15, 2018
hmmmm... then letz wait for Biswa96. he have some idea :)
Biswa96 commentedon Feb 15, 2018
No, your step does not work. My step will be like: you install in external drive > backup a simple registry ( ~2KB) > Connect the drive anywhere > Just import the registry.
If you want to upload/download WSL, then you follow Rich Turner (@bitcrazed) answer in this link: https://superuser.com/a/1199498/726810 or see this issue #2567
SvenBudak commentedon Feb 15, 2018
Oh.. Thanks, but i think i dont understand Richard Turner`s Tutorial. Maybe i better wait for a solution from Microsoft. Hope for a OneDrive Solution.
fpqc commentedon Feb 15, 2018
You can use tar and untar on the current directory.
bitcrazed commentedon Feb 15, 2018
@BamiGorengo - Please avoid spelunking around in WSL's folders - there be dragons!
Also, the folder you were proposing copying between machines contains the entire userspace - this is overkill and is unlikely to work well as a backup mechanism.
Instead, focus on copying your settings, home folder, and (if necessary) generating the list of currently installed packages, so that you can export/copy that list to restore onto a fresh new instance of the same distro. The first answer to this AskUbuntu question should help: https://askubuntu.com/questions/9135/how-to-backup-settings-and-list-of-installed-packages
Biswa96 commentedon Feb 15, 2018
Rich Turner (@bitcrazed) One can fix the permission with
NtSetEaFile()function. ThisLXATTRBextended attribute can be added to wsl.exe so that user can fix file/folder/hard link permissions.bitcrazed commentedon Feb 15, 2018
It's not just about permissions. There are other potential issues caused by unexpected file locking semantics, etc. We are working to improve Windows --> Linux filesystem interop in future releases and, in the meantime, encourage users to avoid spelunking into the Linux filesystem via Windows and Windows apps/tools.
Biswa96 commentedon Feb 16, 2018
In this context, I thought if WSL can be backed up in a Virtual Hard Disk file (.vhd). Can WSL be install in a vhd file?
WSLUser commentedon Feb 16, 2018
Biswapriyo Nath (@Biswa96) asking for WSL install via .vhd? Next we'll be asking for a .iso installation.
bitcrazed commentedon Feb 17, 2018
Today, the only place we support installing WSL distros on Client OS' is to the locations controlled, managed, and configured via the built-in infrastructure.
While you MIGHT be able to install distros elsewhere, you do so at your own risk ;)
Similarly, I don't believe we support installing distro's to magnetic tape drives, Hollerith punched card machines, or Jacquard looms ;)
fpqc commentedon Feb 17, 2018
I wonder if with serial support you can now display WSL on a teletype machine 🤔
I've seen it done with bare metal linux on youtube.
bitcrazed commentedon Feb 21, 2018
Give it a try and let us know how you get on :D
SvenBudak commentedon Feb 21, 2018
The Problem is that my english is really bad, i cant follow all informations that i get in replys in this issue... And when i need to google to solve to much terminal and linux permission problems that i dont understand... it will ends in chaos :D The only way is a "drag & drop" solution. i checked docker because i hoped that i can mount that image so easy like mounting images with deamon tools... but that seems not so easy like i hoped... ;P
therealkenc commentedon Apr 3, 2018
Ran course.
abalter commentedon Dec 17, 2018
I did find this list of methods, but haven't tried them yet.
https://superuser.com/questions/1164818/how-to-backup-wsl-linux-subsystem-for-windows-10-before-system-reset-or-reins/1344203#1344203
BeErikk commentedon May 25, 2019
If anyone wonders more about this, I've installed WSL on a virtual drive through the
server installationmethod on Windows 10. It's been running without any problems since July 2018. I have the drive automount at computer start. As far as I've seen Windows is not depended on any WSL services before the automount. I will reinstall a clean Windows at the coming Windows update, so I will have to find a way to reattach my WSL drive. The virtual drive file can without issue be moved anywhere, backed up etc, even mounted from your network. The file is currently ~5GB.Venipa commentedon Jun 8, 2019
wsl --export <Distro> <filepath (ex: ./debian-development.wsl)>on new machine
wsl --import <filepath to your backup)may take a while. made an dev env with this super handy stored my ssh keys etc there.
i hope im not to late
abalter commentedon Jun 8, 2019
Venipa -- what is
<Distro>here? How does Windows name your WSL?abalter commentedon Jun 8, 2019
Venipa -- I don't see an
--exportoption.abalter commentedon Jun 8, 2019
Hmmm. I think I may need to update Windows to get this feature. I'll report back.
Venipa commentedon Jun 8, 2019
currently on 20h1 but i know its in 19h1