new raceday and backup
This commit is contained in:
37
README.md
37
README.md
@@ -116,6 +116,12 @@ Recommended deployment:
|
||||
- `Race Setup` = untimed Open Practice or competition races with personal driver transponders
|
||||
- Grouped navigation follows the operating flow: `Start`, `Create`, `Run and follow`, `Directory`, and `System and help`.
|
||||
- `Dashboard -> Getting started` links directly to system setup, driver registration, race/practice creation, Timing, and Overlay.
|
||||
- Race Day operation:
|
||||
- focused current/next/after-next heat queue
|
||||
- preflight for decoder, participants, transponders, duplicate IDs, lap window, grid and audio
|
||||
- shared start/finish/pause logic with the existing Timing view
|
||||
- automatic consistent SQLite backup before every session start, full data import and data clear operation
|
||||
- latest 30 server backups listed under `Settings -> Storage`
|
||||
- Storage/import tools:
|
||||
- full race-data export/import for backup or moving to another machine
|
||||
- directory export/import for only classes, drivers and cars
|
||||
@@ -631,6 +637,37 @@ npm run start:fg
|
||||
- `windows\start_all.bat`: start AMMC and backend, then open the browser
|
||||
- `windows\stop_all.bat`: stop the backend and `ammc-amb.exe`
|
||||
|
||||
### Restore a server backup
|
||||
|
||||
Backups are stored in `data/backups/`. Restore is intentionally a local server command and is not exposed through the unauthenticated web API.
|
||||
|
||||
1. Stop RC RaceCore.
|
||||
2. Copy the backup filename from `Settings -> Storage` or list the files in `data/backups/`.
|
||||
3. Run the restore command with the explicit confirmation flag.
|
||||
4. Start RC RaceCore again.
|
||||
|
||||
Windows PowerShell:
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
Linux:
|
||||
|
||||
```bash
|
||||
npm stop
|
||||
backup=$(find data/backups -maxdepth 1 -name '*.sqlite' -printf '%T@ %f\n' | sort -nr | head -n 1 | cut -d' ' -f2-)
|
||||
printf 'Restoring %s\n' "$backup"
|
||||
npm run backup:restore -- "$backup" --confirm
|
||||
npm start
|
||||
```
|
||||
|
||||
The restore command validates the selected SQLite file and creates a `pre_restore` backup of the current database before replacing it.
|
||||
|
||||
### Update an existing installation without losing data
|
||||
|
||||
The SQLite database and local configuration are in `data/`. Do not delete or replace this directory during an update.
|
||||
|
||||
Reference in New Issue
Block a user