new raceday and backup

This commit is contained in:
larssand
2026-09-01 07:07:23 +02:00
parent c2bfa97d30
commit f561dd8feb
21 changed files with 1042 additions and 60 deletions

View File

@@ -209,6 +209,23 @@ npm.cmd ci
npm.cmd run verify
```
## Automatic backup and local restore
RC RaceCore creates a consistent SQLite snapshot before every session start, full data import, and data clear operation. The latest 30 files are retained in `data\backups` and listed under `Settings -> Storage`.
Restore is local-only because the administration UI does not yet have authentication. Run it from PowerShell on the Windows server:
```powershell
npm.cmd stop
$backup = Get-ChildItem .\data\backups\*.sqlite | Sort-Object LastWriteTime -Descending | Select-Object -First 1
$backup.Name
npm.cmd run backup:restore -- $backup.Name --confirm
npm.cmd start
npm.cmd run status
```
The restore script refuses to run while the managed server PID is active, validates the backup, checkpoints SQLite, and creates another `pre_restore` snapshot before replacement.
## Update an existing installation
Stop the service, update the files, reinstall locked dependencies, verify, and restart: