$ | >

Backup/Restore/Share/Snapshot a WSL installation

Backup / Restore / Snapshot a WSL installation.

For development puproses it would be very nice to ba able to backup a WSL installtion and to resore it on the same or another(!) PC.

Provide a means of 'going back' (like a VMware snapshot) when a WSL installation became unstable, bloated, corrupt.

BTW is there a way to have more than one Ubuntu installations at the same time?

Best regards.

62 votes
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    Lutz shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    3 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...
      • Kenneth Benson commented  ·   ·  Flag as inappropriate

        It can be backed up fairly easily, tho not from inside WSL. Go to C:\Users\<username>\Appdata\Local\Packages\CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc (although the part starting from the underscore after onWindows may be different on different PCs) and backup that directory with your favorite method. I've seen people do it with a backup program and I've seen using 7-Zip to backup/compress the whole thing. Make sure you get that directory and all the sub-directories as one has the rootfs in it and another has all the permissions for the rootfs (I think in one of the localstate dirs... best to just back it *all* up). To restore just put it all back to the same place.

      • Anonymous commented  ·   ·  Flag as inappropriate

        I productively use the WSL (ssh, building, ...). It'd be nice to make a backup from time to time or before perfoming a release upgrade.

      • Bjorn commented  ·   ·  Flag as inappropriate

        Yeah, i've been experimenting with using WSL as a dev env, but it would really help if we can get some way of distibuting the built version to other people. This would make running/resetting it so much easier, and possibly make it a good way to get a env up and running fast.

      Feedback and Knowledge Base