Rewrite README with consistent Source/Destination terminology
CLI commands still use targets/remotes internally but all prose and section headers use Source/Destination language throughout. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
79
README.md
79
README.md
@@ -73,13 +73,17 @@ The installer detects dependencies, sets up config directories, and optionally l
|
|||||||
# Launch the TUI
|
# Launch the TUI
|
||||||
gniza
|
gniza
|
||||||
|
|
||||||
# Or use the CLI
|
# Or use the CLI to add a source and destination
|
||||||
gniza targets add --name=mysite --folders=/var/www,/etc/nginx
|
gniza --cli targets add --name=mysite --folders=/var/www,/etc/nginx
|
||||||
gniza remotes add --name=backup-server
|
gniza --cli remotes add --name=backup-server
|
||||||
|
|
||||||
|
# Run a backup
|
||||||
gniza --cli backup --target=mysite
|
gniza --cli backup --target=mysite
|
||||||
gniza --cli backup --all
|
gniza --cli backup --all
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> **Note**: The CLI uses `targets` for sources and `remotes` for destinations. The TUI uses the friendlier "Sources" and "Destinations" labels.
|
||||||
|
|
||||||
## CLI Reference
|
## CLI Reference
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -92,17 +96,35 @@ Options:
|
|||||||
--help Show help
|
--help Show help
|
||||||
--version Show version
|
--version Show version
|
||||||
|
|
||||||
Commands:
|
Sources:
|
||||||
backup [--target=NAME] [--remote=NAME] [--all]
|
targets list List all configured sources
|
||||||
restore --target=NAME --snapshot=TS [--remote=NAME] [--dest=DIR] [--skip-mysql]
|
targets add --name=NAME --folders=PATHS
|
||||||
targets list | add | delete | show [--name=NAME] [--folders=PATHS]
|
targets delete --name=NAME
|
||||||
remotes list | add | delete | show | test | disk-info-short [--name=NAME]
|
targets show --name=NAME
|
||||||
snapshots list [--target=NAME] [--remote=NAME]
|
|
||||||
browse --target=NAME --snapshot=TS [--remote=NAME]
|
Destinations:
|
||||||
retention [--target=NAME] [--remote=NAME] [--all]
|
remotes list List all configured destinations
|
||||||
schedule install | show | remove
|
remotes add --name=NAME
|
||||||
logs [--last] [--tail=N]
|
remotes delete --name=NAME
|
||||||
web start | install-service | remove-service | status [--port=PORT]
|
remotes show --name=NAME
|
||||||
|
remotes test --name=NAME Validate connectivity
|
||||||
|
remotes disk-info-short --name=NAME Show disk usage
|
||||||
|
|
||||||
|
Operations:
|
||||||
|
backup [--target=NAME] [--remote=NAME] [--all]
|
||||||
|
restore --target=NAME --snapshot=TS [--remote=NAME] [--dest=DIR] [--skip-mysql]
|
||||||
|
retention [--target=NAME] [--remote=NAME] [--all]
|
||||||
|
|
||||||
|
Snapshots:
|
||||||
|
snapshots list [--target=NAME] [--remote=NAME]
|
||||||
|
snapshots browse --target=NAME --snapshot=TS [--remote=NAME]
|
||||||
|
|
||||||
|
Scheduling:
|
||||||
|
schedule install | show | remove
|
||||||
|
|
||||||
|
Other:
|
||||||
|
logs [--last] [--tail=N]
|
||||||
|
web start | install-service | remove-service | status [--port=PORT]
|
||||||
uninstall
|
uninstall
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -113,7 +135,7 @@ Commands:
|
|||||||
| Root | `/etc/gniza/` | `/var/log/gniza/` | `/var/run/gniza.lock` |
|
| Root | `/etc/gniza/` | `/var/log/gniza/` | `/var/run/gniza.lock` |
|
||||||
| User | `~/.config/gniza/` | `~/.local/state/gniza/log/` | `$XDG_RUNTIME_DIR/gniza-$UID.lock` |
|
| User | `~/.config/gniza/` | `~/.local/state/gniza/log/` | `$XDG_RUNTIME_DIR/gniza-$UID.lock` |
|
||||||
|
|
||||||
Config subdirectories: `targets.d/*.conf`, `remotes.d/*.conf`, `schedules.d/*.conf`
|
Config subdirectories: `targets.d/*.conf` (sources), `remotes.d/*.conf` (destinations), `schedules.d/*.conf`
|
||||||
|
|
||||||
### Global Settings (`gniza.conf`)
|
### Global Settings (`gniza.conf`)
|
||||||
|
|
||||||
@@ -245,8 +267,8 @@ SCHEDULE_TIME="02:00" # HH:MM
|
|||||||
SCHEDULE_DAY="" # Day of week (0-6) or day of month (1-28)
|
SCHEDULE_DAY="" # Day of week (0-6) or day of month (1-28)
|
||||||
SCHEDULE_CRON="" # Full cron expression (when SCHEDULE=custom)
|
SCHEDULE_CRON="" # Full cron expression (when SCHEDULE=custom)
|
||||||
SCHEDULE_ACTIVE="yes"
|
SCHEDULE_ACTIVE="yes"
|
||||||
TARGETS="" # Comma-separated sources (empty = all)
|
TARGETS="" # Comma-separated source names (empty = all)
|
||||||
REMOTES="" # Comma-separated destinations (empty = all)
|
REMOTES="" # Comma-separated destination names (empty = all)
|
||||||
```
|
```
|
||||||
|
|
||||||
## How Incremental Backups Work
|
## How Incremental Backups Work
|
||||||
@@ -292,14 +314,14 @@ Requires `rclone` to be installed.
|
|||||||
## Snapshot Structure
|
## Snapshot Structure
|
||||||
|
|
||||||
```
|
```
|
||||||
$BASE/<hostname>/targets/<source>/snapshots/<YYYY-MM-DDTHHMMSS>/
|
<base>/<hostname>/sources/<name>/snapshots/<YYYY-MM-DDTHHMMSS>/
|
||||||
├── meta.json # Metadata (source, timestamp, duration, pinned)
|
+-- meta.json # Metadata (source, timestamp, duration, pinned)
|
||||||
├── manifest.txt # File listing
|
+-- manifest.txt # File listing
|
||||||
├── var/www/ # Backed-up directories
|
+-- var/www/ # Backed-up directories
|
||||||
├── etc/nginx/
|
+-- etc/nginx/
|
||||||
└── _mysql/ # MySQL dumps (if enabled)
|
+-- _mysql/ # MySQL dumps (if enabled)
|
||||||
├── dbname.sql.gz
|
+-- dbname.sql.gz
|
||||||
└── _grants.sql.gz
|
+-- _grants.sql.gz
|
||||||
```
|
```
|
||||||
|
|
||||||
During transfer, snapshots are stored in a `.partial` directory. On success, the directory is renamed to the final timestamp. Interrupted backups leave no incomplete snapshots.
|
During transfer, snapshots are stored in a `.partial` directory. On success, the directory is renamed to the final timestamp. Interrupted backups leave no incomplete snapshots.
|
||||||
@@ -337,13 +359,12 @@ Auto-detects `mysqldump` or `mariadb-dump`.
|
|||||||
gniza manages cron entries for automated backups.
|
gniza manages cron entries for automated backups.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Via CLI
|
|
||||||
gniza --cli schedule install # Install all schedules to crontab
|
gniza --cli schedule install # Install all schedules to crontab
|
||||||
gniza --cli schedule show # Show current cron entries
|
gniza --cli schedule show # Show current cron entries
|
||||||
gniza --cli schedule remove # Remove gniza cron entries
|
gniza --cli schedule remove # Remove gniza cron entries
|
||||||
```
|
```
|
||||||
|
|
||||||
Cron entries are tagged with `# gniza4linux:<name>` for clean install/removal. Each schedule can target specific sources and destinations.
|
Cron entries are tagged for clean install/removal. Each schedule can be scoped to specific sources and destinations. Last run time is tracked per schedule and only updated on successful completion.
|
||||||
|
|
||||||
## Notifications
|
## Notifications
|
||||||
|
|
||||||
@@ -360,8 +381,6 @@ Email notifications on backup success or failure.
|
|||||||
Serve the full TUI in a browser via textual-serve with HTTP Basic Auth.
|
Serve the full TUI in a browser via textual-serve with HTTP Basic Auth.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Enable during install (generates admin password)
|
|
||||||
# Or set up manually:
|
|
||||||
gniza web install-service # Install systemd service (port 2323)
|
gniza web install-service # Install systemd service (port 2323)
|
||||||
gniza web start # Start the service
|
gniza web start # Start the service
|
||||||
gniza web status # Check status
|
gniza web status # Check status
|
||||||
@@ -380,7 +399,7 @@ Launch with `gniza` (no arguments). The TUI provides:
|
|||||||
- **Backup** — Run backups with source/destination selection
|
- **Backup** — Run backups with source/destination selection
|
||||||
- **Restore** — Browse snapshots and restore to original location or custom directory
|
- **Restore** — Browse snapshots and restore to original location or custom directory
|
||||||
- **Running Tasks** — Monitor active backup/restore jobs with live log output
|
- **Running Tasks** — Monitor active backup/restore jobs with live log output
|
||||||
- **Schedules** — Manage cron schedules with time/day pickers
|
- **Schedules** — Manage cron schedules with time/day pickers and toggle switches
|
||||||
- **Snapshots** — Browse and manage stored snapshots
|
- **Snapshots** — Browse and manage stored snapshots
|
||||||
- **Logs** — View backup history with pagination
|
- **Logs** — View backup history with pagination
|
||||||
- **Settings** — Configure global options
|
- **Settings** — Configure global options
|
||||||
|
|||||||
Reference in New Issue
Block a user