(docs) Reframe documentation around Django-first operations
Update the README to describe pobsync as a Django-first, SQL-backed service with the control panel as the primary operational interface. Move CLI examples out of the normal workflow and document them as maintainer tooling for debugging, services, and migration tasks.
This commit is contained in:
@@ -34,58 +34,32 @@ docker compose build web scheduler worker
|
||||
docker compose run --rm web python manage.py test pobsync_backend --verbosity 2
|
||||
```
|
||||
|
||||
## SQL-First Commands
|
||||
## Maintainer CLI
|
||||
|
||||
The Django UI is the normal operating surface, but the `pobsync` entrypoint remains useful for setup and inspection.
|
||||
The Django UI is the normal operating surface. The `pobsync` entrypoint and direct `manage.py` commands are kept for
|
||||
debugging, automated maintenance, and migrations. Prefer using the control panel for day-to-day host configuration,
|
||||
schedule changes, manual backup queueing, snapshot discovery, retention planning, and SSH credential management.
|
||||
|
||||
Create global config:
|
||||
|
||||
```
|
||||
pobsync configure-global --backup-root /mnt/backups/pobsync
|
||||
```
|
||||
|
||||
Create a host config:
|
||||
|
||||
```
|
||||
pobsync configure-host <host> --address <host-or-ip>
|
||||
```
|
||||
|
||||
Run a backup:
|
||||
|
||||
```
|
||||
pobsync backup <host> --prune
|
||||
```
|
||||
|
||||
Create or update a schedule:
|
||||
|
||||
```
|
||||
pobsync schedule <host> --cron "15 2 * * *" --prune
|
||||
```
|
||||
|
||||
Run the scheduler:
|
||||
|
||||
```
|
||||
pobsync scheduler --loop --interval 60
|
||||
```
|
||||
|
||||
Plan or apply retention manually:
|
||||
|
||||
```
|
||||
pobsync retention <host>
|
||||
pobsync retention <host> --apply --yes --max-delete 10
|
||||
```
|
||||
|
||||
Discover snapshots already present on disk:
|
||||
|
||||
```
|
||||
pobsync discover-snapshots --host <host>
|
||||
```
|
||||
|
||||
The `pobsync` executable is a thin wrapper around Django management commands. Direct Django access is also available:
|
||||
Useful checks:
|
||||
|
||||
```
|
||||
pobsync django check
|
||||
python3 manage.py run_pobsync_backup <host> --prune
|
||||
python3 manage.py showmigrations pobsync_backend
|
||||
```
|
||||
|
||||
Worker and scheduler commands are normally run by systemd services:
|
||||
|
||||
```
|
||||
pobsync worker --loop --interval 15
|
||||
pobsync scheduler --loop --interval 60
|
||||
```
|
||||
|
||||
One-off maintenance commands are still available when the UI is not the right tool:
|
||||
|
||||
```
|
||||
pobsync backup <host> --dry-run
|
||||
pobsync discover-snapshots --host <host>
|
||||
pobsync retention <host>
|
||||
```
|
||||
|
||||
## Migration Helpers
|
||||
@@ -102,7 +76,8 @@ Export SQL config to legacy runtime YAML for inspection or one-off compatibility
|
||||
python3 manage.py export_pobsync_configs --prefix /opt/pobsync
|
||||
```
|
||||
|
||||
These commands are migration helpers, not the normal operating model.
|
||||
These commands are migration helpers, not the normal operating model. After import, review and continue operating from
|
||||
the Django control panel.
|
||||
|
||||
## Docker With SQLite
|
||||
|
||||
@@ -158,7 +133,8 @@ sudo scripts/install-systemd --install-extras mariadb
|
||||
|
||||
## Current Architecture
|
||||
|
||||
The public command surface is Django-first. The old YAML/cron CLI has been retired from the `pobsync` entrypoint.
|
||||
The public operating surface is Django-first. The CLI is now a maintainer layer around Django management commands and
|
||||
the old YAML/cron workflow has been retired from the `pobsync` entrypoint.
|
||||
Discovered snapshots are stored in `SnapshotRecord`, including the base snapshot metadata and a nullable SQL link to the
|
||||
base record when it is known.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user