Storage
Filesystem
Store artifact content in a local directory instead of an S3 service, on a single node.
RELIC_OBJECT_STORAGE_TYPE=filesystem
RELIC_OBJECT_STORAGE_PATH=/var/lib/relic/objects
The S3 settings are ignored. The server and the worker must see the same directory, so both run on one host.
Layout
| Directory | Holds |
|---|---|
artifacts/ | Content under sha256/<aa>/<bb>/<sha256>. |
temporary/ | Uploads in progress. |
staging/ | Files being written, renamed into place once complete. |
Relic creates the directories at start. Copies within the store use hard links where the filesystem allows.
Requirements
- Local disk. On Linux, Relic refuses to start on NFS, SMB/CIFS, FUSE, NCP, AFS, Coda, 9P, CephFS or Lustre. On other systems it does not check.
- One filesystem for the whole directory, so renames are atomic.
- Write access for the user Relic runs as (UID 65532 in the image).
Expiry
On every garbage collection run, the worker deletes files in temporary/ and
staging/ older than one day. relic_gc_deleted_temporary_files_total counts
them.
Backups
Back up the database first, then copy artifacts/ (rsync -a, or a filesystem
snapshot). Backup explains why the order matters.