92 lines
4.1 KiB
Plaintext
92 lines
4.1 KiB
Plaintext
|
|
|
|
`yama init` → init a yama pile right here, right now
|
|
creates:
|
|
* config
|
|
* directory structure
|
|
* master keyring (prompts for password)
|
|
|
|
|
|
`--zstd-dict <dict> | --no-zstd-dict`: choose a Zstd dictionary (or lack thereof)
|
|
|
|
OR
|
|
|
|
`yama init --sftp` → interactively create SFTP pile
|
|
`yama init --s3` → interactively create S3 pile
|
|
creates:
|
|
* config (remote)
|
|
* directory structure (remote)
|
|
* master keyring (local + optionally remote too, prompts for password)
|
|
* connection information file (local)
|
|
|
|
|
|
`yama keyring`
|
|
`inspect <file>.yamakeyring` → print contents of keyring, ask for password if needed
|
|
|
|
`new|create <new> [--from <src>] [--with <keylist>] [--no-password]`
|
|
create a new keyring based on another one. If `--from` not specified, then defaults to the master key in this directory (`master.yamakeyring`).
|
|
|
|
if `--no-password` is specified, then the new keyring will be unprotected
|
|
|
|
if `--with` is specified, then it's either a list of keynames to include (e.g. `r_bloblog_contents`, etc)
|
|
or a list of opinionated roles (ALL, config, backup, restore, ...?)
|
|
|
|
e.g. you might give your server a keyring with:
|
|
`yama keyring new myserver.yamakeyring --from master.yamakeyring --with backup --no-password` to allow it to create backups but not read from them
|
|
|
|
|
|
`yama store <source file/dir> [<dest pile/pileconnector dir>:]<pointer name>`
|
|
Stores a file/directory into Yama, with the given pointer.
|
|
|
|
If `--stdin` is passed, then the contents to store are actually read from stdin instead and the provided filename is a fake filename for informational purposes only.
|
|
Would be suitable for `pg_dump | yama store --stdin mydbname.sql
|
|
|
|
If `--force` is passed, this can overwrite a pointer name.
|
|
|
|
I expect we will also have `--exclude` and `--exclude-list` options.
|
|
I expect we will also have a `--dry-run` option.
|
|
|
|
`yama extract [<dest pile/pileconnector dir>:]<pointer name>[/path/to/subtree] (--stdout | <target file/dir>)`
|
|
Extracts a file/directory from Yama, from the given pointer.
|
|
|
|
If `--stdout` is passed, writes to stdout, in which case the input must be just one file.
|
|
|
|
I expect we will also have `--exclude` and `--exclude-list` options.
|
|
I expect we will also have a `--dry-run` option.
|
|
|
|
`yama mount [<dest pile/pileconnector dir>:]<pointer name>[/path/to/subtree] <target file/dir>`
|
|
Mount a pointer as a read-only FUSE filesystem.
|
|
|
|
`yama check`
|
|
Checks consistency of the pile. One of the levels must be specified:
|
|
`--pointers`|`-1`: checks that all pointers are valid
|
|
`--shallow`|`-2`: checks that all pointers' tree nodes point to chunks that exist.
|
|
|
|
`--intensive`|`-9`: checks that all chunks have the correct hash, that all indices correctly represent the bloblogs, that all pointers point to valid files in the end, ... as much as possible
|
|
|
|
|
|
`yama lsp [[<dest pile/pileconnector dir>:]<glob>]`
|
|
(glob defaults to `.:*`)
|
|
Lists pointers in the pile.
|
|
|
|
If `--deleted` is specified, includes deleted pointers that have yet to be vacuumed.
|
|
|
|
|
|
`yama rmp [<dest pile/pileconnector dir>:]<pointer>`
|
|
Deletes pointers, or marks them as deleted.
|
|
|
|
If `--glob` specified, then `<pointer>` is a glob.
|
|
|
|
If `--now` is specified, an exclusive lock is required to actually delete the pointer.
|
|
If `--now` is *not* specified, then the pointer is merely marked as deleted and this only requires a shared lock.
|
|
|
|
`yama vacuum`
|
|
Vacuums the pile, reclaiming disk space. Holds an exclusive lock over the pile.
|
|
Does things like:
|
|
- (--pointers) clean up deleted pointers that need to be actually deleted
|
|
- (--sweep) scans all pointers to discover all the chunks that are present in bloblogs but not used, then removes them from the indices (possibly slow, but necessary to actually make bloblog repacking possible)
|
|
- (--indices) writes new indices to replace existing indices, if the existing indices are not space-efficient
|
|
- (--bloblogs) repacks bloblogs that aren't space-efficient, removing unindexed blobs in the process
|
|
|
|
`--all` for everything.
|