civex store
Manage file storage volumes
| Command | Description |
|---|---|
add |
Add a new storage volume. |
adopt |
Declare that the drive at a volume's path is that volume. |
collections |
Show which volumes hold each collection's files. |
gc |
Reclaim object-store blobs no longer referenced by any record or workflow job. |
list |
List configured volumes and their current usage. |
move |
Move stored files between volumes. |
place |
Choose which volume a collection's new files go to |
queue |
Set the write queue (ordered list of volumes for new file writes). |
remove |
Remove a volume from the configuration (does not delete files). |
set-state |
Change what a volume may be used for. |
transfers |
Look at, pause, resume and cancel moves of files between volumes |
update |
Update a volume's path or allocation. |
where |
Show which volume each of a record's files is stored on. |
civex store add
Add a new storage volume.
The path can be on a removable drive or a network drive that is already mounted on this computer. Civex doesn't mount network drives itself: mount it first, then give the mounted folder.
Usage
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
NAME |
str |
yes | Volume name |
Options
| Option | Type | Default | Description |
|---|---|---|---|
--path, -p |
str |
Directory path for this volume (required) | |
--allocated-gb |
float |
Max GB civex may use (omit for unlimited) | |
--queue |
flag | false |
Also add the volume to the general write queue. |
civex store adopt
Declare that the drive at a volume's path is that volume.
A volume is recognised by an identity marker in its root, so civex can tell an unplugged drive from a different drive mounted at the same path. If a volume is reported as the wrong drive but this is in fact the right one (the marker was deleted, or the drive was re-formatted), this rewrites the marker. Nothing else on the drive is changed.
Usage
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
NAME |
str |
yes | Volume name |
Options
| Option | Type | Default | Description |
|---|---|---|---|
--yes, -y |
flag | false |
Skip the confirmation |
civex store collections
Show which volumes hold each collection's files.
Lists, for each collection, the volumes that hold some of its files with how
many files and how much space, and flags files that another collection also
uses and volumes that can't be reached right now. Read from the catalog, so
it is quick. With --volume it answers the other way round: which collections
are on a given drive. To gather a split collection onto one volume, use
civex store move --collection.
Usage
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
NAME |
str |
no | Show just this collection (default: every collection with files). |
Options
| Option | Type | Default | Description |
|---|---|---|---|
--volume |
str |
Only collections that have files on this volume: what is on a drive. |
civex store gc
Reclaim object-store blobs no longer referenced by any record or workflow job.
Not a root: audit history and job step logs, which retain FileRef snapshots forever -- treating them as roots would leave almost nothing collectible. Old audit diffs may reference a sha256 that GC has since removed; that's the accepted tradeoff of running this at all.
Defaults to a dry run. Pass --apply to actually delete.
Usage
Options
| Option | Type | Default | Description |
|---|---|---|---|
--apply |
flag | false |
Actually delete collectible objects. Without this flag, only reports what would be deleted. |
--grace-days |
int |
14 |
Skip unreferenced objects written more recently than this many days, to avoid racing an in-flight upload whose record/job write hasn't committed yet. |
--show |
int |
20 |
Max collectible objects to list individually |
--volume |
str |
Only clean up objects stored on this volume (default: every volume). | |
--rebuild-refs |
flag | false |
Recompute the file-reference table from every record and job before collecting. Normally unnecessary (it is kept current on every write); use it if the table may have drifted, e.g. after editing the database directly. |
civex store list
List configured volumes and their current usage.
Usage
civex store move
Move stored files between volumes.
Use --off to empty a volume, or --collection to gather a collection's
files onto one volume. Each file is copied and checked before the original
is removed, so stopping at any moment, even a power cut, loses nothing.
Moves run one at a time: if one is already running, this one is queued
behind it. Ctrl+C pauses; resume later with civex store transfers resume.
Usage
Options
| Option | Type | Default | Description |
|---|---|---|---|
--to |
str |
Volume to put files on (repeat for several, in order). (required) | |
--off |
str |
Empty this volume (repeatable). | |
--collection |
str |
Gather this collection's files onto the target (repeatable). | |
--verify-full |
flag | false |
Read every copy back and check it (slower). |
--keep-writable |
flag | false |
Don't make the source read-only while draining. |
--dry-run |
flag | false |
Show what would move and stop. |
civex store place
Choose which volume a collection's new files go to
Usage
civex store queue
Set the write queue (ordered list of volumes for new file writes).
Usage
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
NAMES... |
str |
yes | Volume names in write priority order |
civex store remove
Remove a volume from the configuration (does not delete files).
Usage
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
NAME |
str |
yes | Volume name |
Options
| Option | Type | Default | Description |
|---|---|---|---|
--force |
flag | false |
Remove even if the volume contains objects (existing file references will become unresolvable) |
civex store set-state
Change what a volume may be used for.
Usage
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
NAME |
str |
yes | Volume name. |
STATE |
str |
yes | active, readonly (readable, never written to) or retired. |
civex store transfers
Look at, pause, resume and cancel moves of files between volumes
Usage
civex store update
Update a volume's path or allocation.
Usage
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
NAME |
str |
yes | Volume name |
Options
| Option | Type | Default | Description |
|---|---|---|---|
--path, -p |
str |
New directory path | |
--allocated-gb |
float |
New allocation limit in GB | |
--clear-allocation |
flag | false |
Remove allocation limit |
civex store where
Show which volume each of a record's files is stored on.
A file is stored once however many records use it, so this is where its content is, not a copy per record. A file on a drive that isn't plugged in is listed with the volume's state.
Usage
Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
RECORD_ID |
str |
yes | Record id (a unique prefix is enough) |
Options
| Option | Type | Default | Description |
|---|---|---|---|
--details |
flag | false |
Also show each file's path on disk and what else uses it. |