![]() \wsl_ubuntu_20.tar -version 2 Correct registry key for restored setup If you want to match where Windows normally installs them to by default, they’re generally in their own folder in C:\Users\NAME\AppData\Local\Packages.įor example creating a setup called ubuntu_test based on a backup file called wsl_ubuntu_20.tar wsl -import ubuntu_test C:\Users\mmcgo\AppData\Local\Packages\ubuntu_test. To restore a backup simply run: wsl -import distro_name install_location file_name.tarįor example to create a setup called Ubuntu-18.04 from a previous WSL setup file called ubuntu.tar and then saving the setup in C:\Users\martin\ubuntu run: wsl -import Ubuntu-18.04 C:\Users\martin\ubuntu ubuntu.tar To create a backup of current setup simply run the code below: wsl -export distro_name file_name.tarįor example to backup a WSL distribution you have named Ubuntu-18.04 to a file called ubuntu.tar simply run: wsl -export Ubuntu-18.04 ubuntu.tar Restore Simply use command below to remove a setup called Ubuntu-test wsl -unregister Ubuntu-test Backup To backup and restore WSL2 setup we run the below commands in PowerShell. #Windows backup scheduler how toHow to manually backup/restore/remove WSL2 I can then easily fully restore my WSL installation with all data using this file and as an added benefit it gives me portability where I can transfer my WSL setup to a flash drive and use it on another computer etc. This results in a single tar file containing all my WSL data and installation details being stored as a safe and secure backup. In order to resolve this issue I schedule an automatic backup of my entire WSL system to a tar file on a weekly basis. However the risk here is that if your WSL installation gets corrupted for whatever reason then you risk losing all data stored within it. By storing all the data within WSL faster read/write times are achieved and it also saves some hassle that can develop between file/directory permissions between Linux and Windows files. It is advised that best practice is to store all your data that you use in connection with Linux within the WSL installation rather than continually accessing it via the windows C: drive. ![]() #Windows backup scheduler fullWindows Subsystem for Linux is fantastic in that it offers basically a full Linux kernel on a Windows operating system which also has access to data you store on the Windows OS as well as within the WSL itself. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |