DEV Community

Henrique Holtz
Henrique Holtz

Posted on • Updated on

How to create a backup of distro from WSL2

Create a new backup of one distro from WSL2 on Windows is very simple. You simply need open a new powershell and run the command bellow:

 wsl --export Ubuntu-20.04 'C:\Backup-wsl\Bkp_Ubuntu-20.04'
Enter fullscreen mode Exit fullscreen mode

Obviously, you can use the command to make the backup from another distro, and/or to another file. (Ex: wsl --export {your_distro} '{your_path}')

Note: To make the backup, the Windows can stop your distro.

Top comments (0)