Add check-connection.sh read-only PBS connectivity check
This commit is contained in:
parent
68aae4715d
commit
28ce261a88
2 changed files with 67 additions and 0 deletions
|
|
@ -15,6 +15,7 @@ Everything lives in `/opt/backup/`. The connection details and credentials
|
|||
| `backup.env.sample` | Template — copy to `backup.env` and fill in real values |
|
||||
| `setup.sh` | Install the client and create the encryption key (run once as root) |
|
||||
| `backup.sh` | Full backup of `/` with client-side encryption |
|
||||
| `check-connection.sh` | Dry-run connectivity/auth check against the PBS (read-only) |
|
||||
| `restore.sh` | FUSE-mount the encrypted backup to browse/restore files |
|
||||
| `/opt/backup/encryption-key.pem` | Client-side encryption key (store a copy off-host!) |
|
||||
| `/opt/backup/exclude` | Paths excluded from the backup |
|
||||
|
|
@ -79,6 +80,22 @@ The mail body contains the timestamp and the contents of `backup.log`. This only
|
|||
covers `backup.sh` failures — a *missed* run (host down, cron removed) is not
|
||||
detected, so monitor the PBS side too.
|
||||
|
||||
## Checking connectivity
|
||||
|
||||
`check-connection.sh` answers "will the next backup probably work?" with
|
||||
read-only checks:
|
||||
|
||||
1. the files `backup.sh` needs (encryption key, exclude list) exist;
|
||||
2. `PBS_SERVER:PBS_PORT` is reachable on TCP;
|
||||
3. an authenticated API round-trip succeeds (it lists existing snapshots for
|
||||
this host on the PBS — nothing is written).
|
||||
|
||||
It prints a `[ok]` per check and exits 0 on success, 1 on failure:
|
||||
|
||||
```
|
||||
./check-connection.sh
|
||||
```
|
||||
|
||||
Encryption is client-side. The key file has no password (`kdf: none`), so
|
||||
**possession of the key file alone is enough to decrypt** — protect it.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue