mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-14 13:05:09 +00:00
feat(kv): accept an sqlite vault file path and read plain-tag tables on copy
A kv vault argument can be the path to an SQLite vault file. With -s, kv copy reads the VAULT_TAG table and the plain-tag table into the VAULT_TAG table.
This commit is contained in:
@@ -429,6 +429,8 @@ unshackle kv COMMAND [ARGS]...
|
||||
|
||||
Copy content keys from one or more source vaults into a destination vault. unshackle skips rows whose KIDs match, unless the existing row has no content key. unshackle never alters or deletes existing data.
|
||||
|
||||
A vault argument is the name of a vault in the config, or the path to an SQLite vault file. Use a path to import a vault file that is not in the config.
|
||||
|
||||
| Option | Description |
|
||||
|---|---|
|
||||
| `-s`, `--service` | Only copy data for a specific service. |
|
||||
@@ -462,6 +464,7 @@ Make service tables on vaults that use tables, for every installed service, wher
|
||||
```shell
|
||||
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 search 0123456789abcdef0123456789abcdef -s EXAMPLE -v main
|
||||
|
||||
@@ -317,6 +317,16 @@ $ unshackle kv copy local shared community
|
||||
|
||||
`--service` and `--local-only` are mutually exclusive.
|
||||
|
||||
To import an SQLite vault file that is not in the config, give its path as the source:
|
||||
|
||||
```console
|
||||
$ unshackle kv copy local ~/Downloads/key_store.db -s EXAMPLE
|
||||
```
|
||||
|
||||
`kv copy` only reads from a source, so the file stays unchanged. `kv sync` also accepts a path, but it writes content keys into that file.
|
||||
|
||||
With `--service`, `kv copy` reads the table named by the service's vault tag and the table named by its plain tag. It writes both into the vault-tag table, which is the table a download reads. Without `--service`, each table keeps its name.
|
||||
|
||||
A pair the destination vault has flagged in `bad_keys` is left behind, so a copy does not undo a flag. `bad_keys` is never treated as a service, so its rows are never copied into a service table.
|
||||
|
||||
### `kv sync`: mirror vaults both ways
|
||||
|
||||
Reference in New Issue
Block a user