How to create a backup of distro from WSL2

henriqueholtz

Henrique Holtz

Posted on August 17, 2022

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.

💖 💪 🙅 🚩
henriqueholtz
Henrique Holtz

Posted on August 17, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related