First commit

This commit is contained in:
Roger Sikorski 2022-09-04 12:37:12 +02:00
commit c6a55eb2d5
Signed by: RogerSik
GPG Key ID: 207958C85208EAC4

8
CreateBackup.ps1 Normal file
View File

@ -0,0 +1,8 @@
[string]$backup_path="C:\Users\roger\SynologyDrive\Archiv\Backups\WSL\"
[string]$distro_name="Ubuntu-22.04"
Write-Output "Creating WSL Backup of distribution $distro_name..."
Get-ChildItem -Path $backup_path | Sort-Object LastWriteTime -Descending | Select-Object -Skip 3 | Remove-Item
#wsl --export $distro_name $backup_path\$distro_name_$((Get-Date).ToString('yyyy-MM-dd')).tar
wsl --export $distro_name $backup_path\$distro_name.tar