Skip to content

Ubuntu Subsystem Backup and reinstall in new/clean win10 Installation #2955

Closed

Description

@SvenBudak

Hi,

Is it possible to backup my Ubuntu Subsystem from 1 Computer and re-import it on one of my other machines?

And is a feature planed where the Subsystem can be synct via OneDrive between all machines?

Activity

  1. fpqc commented on Feb 15, 2018

    @fpqc

    It's suggested to backup your user home directory and then reinstall, copy the home back in, and fix the permissions.

  2. SvenBudak commented on Feb 15, 2018

    @SvenBudak
    Author

    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 ;)

  3. Biswa96 commented on Feb 15, 2018

    @Biswa96

    @BamiGorengo Do you have any external HDD or SSD? I've some idea.

  4. SvenBudak commented on Feb 15, 2018

    @SvenBudak
    Author

    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?

  5. fpqc commented on Feb 15, 2018

    @fpqc

    no, zip will kill the permissions 🙄

  6. SvenBudak commented on Feb 15, 2018

    @SvenBudak
    Author

    hmmmm... then letz wait for Biswa96. he have some idea :)

  7. Biswa96 commented on Feb 15, 2018

    @Biswa96

    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

  8. SvenBudak commented on Feb 15, 2018

    @SvenBudak
    Author

    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.

  9. fpqc commented on Feb 15, 2018

    @fpqc

    You can use tar and untar on the current directory.

  10. bitcrazed commented on Feb 15, 2018

    @bitcrazed
    Contributor

    @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

  11. Biswa96 commented on Feb 15, 2018

    @Biswa96

    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.

  12. bitcrazed commented on Feb 15, 2018

    @bitcrazed
    Contributor

    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.

  13. Biswa96 commented on Feb 16, 2018

    @Biswa96

    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?

  14. WSLUser commented on Feb 16, 2018

    @WSLUser

    Biswapriyo Nath (@Biswa96) asking for WSL install via .vhd? Next we'll be asking for a .iso installation.

  15. bitcrazed commented on Feb 17, 2018

    @bitcrazed
    Contributor

    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 ;)

  16. fpqc commented on Feb 17, 2018

    @fpqc

    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.

  17. bitcrazed commented on Feb 21, 2018

    @bitcrazed
    Contributor

    Give it a try and let us know how you get on :D

  18. SvenBudak commented on Feb 21, 2018

    @SvenBudak
    Author

    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

  19. therealkenc commented on Apr 3, 2018

    @therealkenc

    Ran course.

  20. BeErikk commented on May 25, 2019

    @BeErikk

    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.

  21. Venipa commented on Jun 8, 2019

    @Venipa

    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

  22. abalter commented on Jun 8, 2019

    @abalter

    Venipa -- what is <Distro> here? How does Windows name your WSL?

  23. abalter commented on Jun 8, 2019

    @abalter

    Venipa -- I don't see an --export option.

    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.
    
  24. abalter commented on Jun 8, 2019

    @abalter

    Hmmm. I think I may need to update Windows to get this feature. I'll report back.

  25. Venipa commented on Jun 8, 2019

    @Venipa


    currently on 20h1 but i know its in 19h1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions