change README.md

This commit is contained in:
2026-08-24 00:53:49 +02:00
parent e423b97c8a
commit d5d4ea2430
+31 -20
View File
@@ -24,15 +24,6 @@ curl -fsSL https://git.ccc-rheintal.ch/spacefreak/pbc/raw/branch/master/install.
This installs the newest tagged version to `/usr/local/bin/pbc`, installs the
dependencies, and puts an example config at `/etc/pbc/config.example`.
From a clone:
```bash
sudo ./pbc install # install the dependencies, then copy pbc where you want it
```
`install.sh` always fetches the newest tagged release from the repository, so running it
from a clone does not install your local copy.
### Updating
Run the same command again to update `pbc` itself:
@@ -198,24 +189,44 @@ filesystem and mark what you want back:
```
pxar:/ > cd etc
pxar:/etc > ls
pxar:/etc > select nginx
pxar:/etc > cd ../home/user
pxar:/home/user > select .ssh/config
pxar:/home/user > list-selected
pxar:/home/user > restore-selected /mnt/restore
pxar:/home/user > exit
pxar:/etc > select hosts
pxar:/etc > find etc/nginx/** --select
pxar:/etc > list-selected
pxar:/etc > restore-selected /mnt/restore
pxar:/etc > exit
```
- `ls`, `cd`, `pwd`, `stat`, `find` — browse the archive
- `select` / `deselect` — mark a file or directory for restore
- `ls`, `cd`, `pwd`, `stat` — browse the archive
- `select <path>` — mark a single file, relative to the current directory
- `find <pattern> --select` — mark everything matching a glob
- `deselect <path>` / `clear-selected` — drop one entry or all of them
- `list-selected` — show what is currently marked
- `restore-selected <target>` — restore only the marked entries
- `restore <target>` — restore the whole archive
- `restore <target> [pattern]` — restore the current directory and everything below it
- `help` — list all available shell commands
- `exit` — leave the shell
Create the target directory beforehand — `pbc` does not create it. It has to be writable
for the user that runs `pbc`, and should be empty.
#### Selecting a directory and everything beneath it
`select` marks exactly the entry you give it and nothing else. Marking a directory
therefore restores an empty directory — its contents are *not* included. Use a glob with
`find --select` instead:
```
pxar:/ > find etc/nginx/** --select
pxar:/ > select etc/nginx
pxar:/ > restore-selected /mnt/restore
```
The `find` line picks up everything below `etc/nginx`; the `select` line adds the
directory itself, so its own permissions and ownership are restored as well.
Note that `find` patterns are always matched against paths relative to the archive root,
no matter which directory you are in, and that `find` scans the whole archive — expect it
to take a while on large backups.
The target path must not exist yet; the restore creates it. Its parent directory has to be
writable for the user that runs `pbc`.
### Everything, or with normal tools