Ugarit
Documentation
Not logged in

Storage administration

Each backend offers a number of administrative commands for administering the storage underlying vaults. These are accessible via the ugarit-storage-admin command line interface.

To use it, run it with the following command:

$ ugarit-storage-admin '<vault identifier>'

The available commands differ between backends, but all backends support the info and help commands, which give basic information about the vault, and list all available commands, respectively. Some offer a stats command that examines the vault state to give interesting statistics, but which may be a time-consuming operation.

Administering splitlog storages

The splitlog backend offers a wide selection of administrative commands. See the help command on a splitlog vault for details. The following commands are available:

help

List the available commands.

info

List some basic information about the storage.

stats

Examine the metadata to provide overall statistics about the archive. This may be a time-consuming operation on large storages.

set-block-size! BYTES

Sets the block size to the given number of bytes. This will affect new blocks written to the storage, and leave existing blocks untouched, even if they are larger than the new block size.

set-max-logfile-size! BYTES

Sets the size at which a log file is finished and a new one started (likewise, existing log files will be untouched; this will only affect new log files)

set-commit-interval! UPDATES

Sets the frequency of automatic synching of the storage state to disk. Lowering this harms performance when writing to the storage, but decreases the number of in-progress block writes that can fail in a crash.

write-protect!

Disables updating of the storage.

write-unprotect!

Re-enables updating of the storage.

reindex!

Reindex the storage, rebuilding the block and tag state from the contents of the log. If the metadata file is damaged or lost, reindexing can rebuild it (although any configuration changes made via other admin commands will need manually repeating as they are not logged).

Administering sqlite storages

The sqlite backend has a similar administrative interface to the splitlog backend, except that it does not have log files, so lacks the set-max-logfile-size! and reindex! commands.

Administering cache storages

The cache backend provides a minimalistic interface:

help

List the available commands.

info

List some basic information about the storage.

stats

Report on how many entries are in the cache.

clear!

Clears the cache, dropping all the entries in it.