Harden demo export cleanup safety
This commit is contained in:
+8
-3
@@ -94,21 +94,26 @@ Clean old offline demo export artifacts without touching uploaded source data:
|
||||
|
||||
```bash
|
||||
python scripts/cleanup_demo_artifacts.py
|
||||
python scripts/cleanup_demo_artifacts.py --keep-latest 3 --apply
|
||||
python scripts/cleanup_demo_artifacts.py --keep-latest 10 --export-type project_report_html
|
||||
python scripts/cleanup_demo_artifacts.py --keep-latest 10 --max-delete 100 --apply
|
||||
```
|
||||
|
||||
Against the Docker runtime, run the backend-container entrypoint:
|
||||
|
||||
```bash
|
||||
docker compose exec -T backend python scripts/cleanup_demo_artifacts.py
|
||||
docker compose exec -T backend python scripts/cleanup_demo_artifacts.py --keep-latest 3 --apply
|
||||
docker compose exec -T backend python scripts/cleanup_demo_artifacts.py --keep-latest 10 --export-type project_report_html
|
||||
docker compose exec -T backend python scripts/cleanup_demo_artifacts.py --keep-latest 10 --max-delete 100 --apply
|
||||
```
|
||||
|
||||
The cleanup script is dry-run by default. It only targets the explicit
|
||||
`GeoIntel Demo - Building QA` project unless `--project-name` is provided, keeps
|
||||
the newest exports per matching project, deletes only `exports` rows/files when
|
||||
`--apply` is set, and refuses to remove files outside the configured
|
||||
`STORAGE_ROOT`.
|
||||
`STORAGE_ROOT`. `--max-delete` defaults to 25 and blocks large cleanup runs until
|
||||
the operator raises it after reviewing dry-run output. Repeat `--export-type` to
|
||||
limit cleanup to specific artifact kinds such as `project_report_html` or
|
||||
`project_metadata_json`.
|
||||
|
||||
## Tower deployment
|
||||
|
||||
|
||||
Reference in New Issue
Block a user