WSL Snappy is a utility tool for backing up Windows Subsystem for Linux (WSL) distributions. It supports both sequential and parallel backup modes, providing flexibility and efficiency.
- Backup WSL distributions to a specified directory.
- Run backups either sequentially or in parallel ("rocket mode") for increased speed.
- Environment variable configuration for easy setup.
- Notification alerts on backup completion or failure.
Before you start using WSL Snappy Backup, make sure you have:
- Windows 10 or higher with WSL installed.
- Go programming language environment.
- WSL distributions that you want to back up.
-
Clone the repository or download the source code.
-
Navigate to the source code directory.
-
Compile the program:
GOOS=windows GOARCH=amd64 go build -ldflags="-H windowsgui" -o bin/wslSnappy.exe cmd/main.go
Set the following environment variables according to your system setup:
WSL_BACKUP_DIR
: The directory where the WSL distributions will be backed up.WSL_DISTRIBUTIONS
: The list of WSL distribution names to back up, separated by commas (e.g.,Ubuntu,Debian
).
You can set these variables using the Windows Command Prompt:
setx WSL_BACKUP_DIR "C:\path\to\your\backup\directory" setx WSL_DISTRIBUTIONS "Ubuntu,Debian"
Run the compiled executable from the command line:
- To perform a sequential backup:
.\bin\wslSnappy.exe
- To perform backups in parallel (rocket mode):
.\bin\wslSnappy.exe --rocket
The program will start the backup process based on your configuration and display the time taken to complete the backups.
Upon completion or failure of a backup, a desktop notification will be shown, informing you of the status.
Contributions, issues, and feature requests are welcome. Please feel free to submit issues and pull requests.
Whether you use this project, have learned something from it, or just like it, please consider supporting it by buying me a coffee, so I can dedicate more time on open-source projects like this
This project is licensed under the MIT License.