Spaces:
Runtime error
Runtime error
Download scripts/backup_db.ps1 from o134/Desinger-System: direct link, hf CLI and curl.
- Browser
- Download file 429 Bytes
-
https://huggingface.co/spaces/o134/Desinger-System/resolve/main/scripts/backup_db.ps1
- Command line
-
hf download hf://spaces/o134/Desinger-System/scripts/backup_db.ps1
-
curl -L -o backup_db.ps1 https://huggingface.co/spaces/o134/Desinger-System/resolve/main/scripts/backup_db.ps1
429 Bytes
| # Backup SQLite local.db | |
| $timestamp = Get-Date -Format "yyyyMMdd_HHmmss" | |
| $backupDir = "backups" | |
| $sourceFile = "local.db" | |
| $destFile = "$backupDir/local_$timestamp.db" | |
| if (-not (Test-Path $backupDir)) { | |
| New-Item -ItemType Directory -Path $backupDir | |
| } | |
| if (Test-Path $sourceFile) { | |
| Copy-Item $sourceFile $destFile | |
| Write-Host "Backup created: $destFile" | |
| } else { | |
| Write-Warning "Source file $sourceFile not found." | |
| } | |