mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-05 07:25:08 +00:00
feat(kv)!: take KID:KEY pairs and key files as kv add arguments with optional --service and --vault
This commit is contained in:
@@ -460,9 +460,16 @@ A vault argument is the name of a vault in the config, or the path to an SQLite
|
||||
|
||||
Make sure that two or more vaults hold the same set of content keys, essentially a chained bidirectional copy. More than one vault is necessary. Accepts the same `--service` / `--local-only` options as `copy`.
|
||||
|
||||
### `kv add FILE SERVICE VAULT...`
|
||||
### `kv add KEY...`
|
||||
|
||||
Add content keys to one or more vaults for a service. `FILE` contains one `KID:KEY` pair per line (32 hex : 32 hex, UTF-8). unshackle skips every line that does not match that form.
|
||||
Add content keys to vaults. Each `KEY` is a `KID:KEY` pair (32 hex : 32 hex; unshackle removes dashes from the KID), or the path of a UTF-8 file with one `KID:KEY` pair per line. unshackle skips every file line that is not a pair. An argument that is not a pair or an existing file stops `kv add` with an error.
|
||||
|
||||
unshackle sends the content keys to each vault, also when another vault already holds them, and reports how many each vault already held.
|
||||
|
||||
| Option | Description |
|
||||
|---|---|
|
||||
| `-s`, `--service` | The service to add the content keys to. Without it, unshackle writes them to the `generic` table. |
|
||||
| `-v`, `--vault` | A vault name from the config, or the path to an SQLite vault file. Repeat it for more vaults. Without it, unshackle writes to every configured vault that does not set `no_push`. |
|
||||
|
||||
### `kv search KID`
|
||||
|
||||
@@ -485,7 +492,8 @@ unshackle kv copy main backup1 backup2
|
||||
unshackle kv copy main backup -s EXAMPLE
|
||||
unshackle kv copy main ~/Downloads/key_store.db -s EXAMPLE
|
||||
unshackle kv sync main mysql_vault
|
||||
unshackle kv add keys.txt EXAMPLE main backup
|
||||
unshackle kv add 0123456789abcdef0123456789abcdef:fedcba9876543210fedcba9876543210
|
||||
unshackle kv add keys.txt -s EXAMPLE -v main -v backup
|
||||
unshackle kv search 0123456789abcdef0123456789abcdef -s EXAMPLE -v main
|
||||
unshackle kv prepare main mysql_vault
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user