10 lines
419 B
PowerShell
10 lines
419 B
PowerShell
$t = "C:\Users\admin\.clawdbot-backup-temp\clawd"
|
|
$timestamp = Get-Date -Format "yyyy-MM-dd_HHmmss"
|
|
$b = "P:\Clawdbot-Backups\backup_$timestamp.zip"
|
|
|
|
Compress-Archive -Path "$t\*" -DestinationPath $b -Force
|
|
$s = [math]::Round((Get-Item $b).Length / 1MB, 2)
|
|
|
|
Write-Host "Backup complete: $b ($s MB)" -ForegroundColor Green
|
|
|
|
Remove-Item -Recurse -Force "C:\Users\admin\.clawdbot-backup-temp" -ErrorAction SilentlyContinue |