other:win10wsl
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
other:win10wsl [2022/08/31 11:40] – Started moving 'backup' to the Advanced section jypeter | other:win10wsl [2022/08/31 14:56] – Moved the restore section to the advanced section jypeter | ||
---|---|---|---|
Line 983: | Line 983: | ||
- | ==== Creating a backup of the Linux running in WSL ==== | + | ===== Advanced usage ===== |
- | There are several types of WSL related directories that you may want to back up: | ||
- | | + | ==== Creating a backup ==== |
+ | |||
+ | === Backup of a FULL Linux installation === | ||
+ | |||
+ | You can use '' | ||
+ | * used later for // | ||
+ | * used for // | ||
+ | |||
+ | Detailed steps: | ||
+ | * Determine the name of the current Linux installation(s) used in WSL | ||
+ | | ||
+ | NAME STATE | ||
+ | * Ubuntu | ||
+ | * [[other: | ||
+ | * < | ||
+ | |||
+ | > wsl -l -v | ||
+ | NAME STATE | ||
+ | * Ubuntu | ||
+ | * Export the specified Linux installation to a //tar// file: | ||
+ | * You should export to a directory | ||
+ | * You should use a detailed enough file name for the tar file\\ e.g. WSL_< | ||
+ | * Example: '' | ||
+ | |||
+ | * If you are not going to use the backup tar file right away, you can optionally compress it in order to save some space | ||
+ | * < | ||
+ | |||
+ | === Backup of specific directories === | ||
+ | |||
+ | You can also just create backups of specific directories: | ||
+ | |||
+ | * Your Linux //home// directory | ||
* <code bash>$ cd /home | * <code bash>$ cd /home | ||
Line 1003: | Line 1033: | ||
95K Feb 24 12:09 / | 95K Feb 24 12:09 / | ||
- | * <wrap hi>Regular Windows folders</ | + | * Regular Windows folders where you store data used by WSL: you can use '' |
+ | * WARNING: there should not be performance issues using '' | ||
+ | ==== Restoring or relocating a Linux installation ==== | ||
+ | |||
+ | When we have a backup in a tar file, we can restore it to the default location (Check ?? FIXME), or specify where we want to restore it. This is a way of moving (relocating) an installation to another disk or partition than the default location '' | ||
==== Restoring a WSL backup ==== | ==== Restoring a WSL backup ==== | ||
Line 1025: | Line 1059: | ||
- | ===== Advanced usage ===== | ||
- | |||
- | |||
- | ==== Creating a backup of a Linux installation ==== | ||
- | |||
- | You can use '' | ||
- | * used later for restoring the full installation | ||
- | * used for relocating the full installation from '' | ||
- | |||
- | |||
- | * Determine the name of the current Linux installation used in WSL (and see if it is running, and using //WSL 1// or //WSL 2//) | ||
- | * < | ||
- | NAME STATE | ||
- | * Ubuntu | ||
- | * [[other: | ||
- | * < | ||
- | |||
- | > wsl -l -v | ||
- | NAME STATE | ||
- | * Ubuntu | ||
- | * Export the specified Linux installation to a //tar// file: | ||
- | * You should export to a directory or external disk where you have //enough// space | ||
- | * You should use a detailed enough file name for the tar file | ||
- | * '' | ||
- | * 1.4 Gb | ||
- | * < | ||
- | |||
- | * You can optionally open a new terminal (this will start again WSL+Ubuntu) to get some information about the created file (size and number of saved files/ | ||
- | * < | ||
- | |||
- | $ ls -ltrh *ubuntu*tar* | ||
- | 976M Jan 21 2020 < | ||
- | 2.8G Aug 22 2020 < | ||
- | 3.4G Feb 24 14:06 < | ||
- | |||
- | # Determine the number of files/ | ||
- | $ tar tvf < | ||
- | 112711 | ||
- | |||
- | $ gzip *ubuntu*.tar | ||
- | |||
- | $ ls -ltrh *ubuntu*tar* | ||
- | 976M Jan 21 2020 < | ||
- | 1.2G Aug 22 2020 < | ||
- | 1.8G Feb 24 14:06 < | ||
- | </ | ||
- | |||
- | ==== Restoring or relocating a Linux installation ==== | ||
- | |||
- | When we have a backup in a tar file, we can restore it to the default location (Check ?? FIXME), or specify where we want to restore it. This is a way of moving (relocating) an installation to another disk or partition than the default location '' | ||
==== Uninstalling WSL ==== | ==== Uninstalling WSL ==== | ||
other/win10wsl.txt · Last modified: 2023/12/06 14:24 by jypeter