timberfs 0.10.1

Experimental append-only, transparently compressed, write-time-indexed filesystem for log files
Documentation
# Systemd socket template for a supervised timberfs log intake.
#
# Pairs with timberfs-log@.service to drain a FIFO into a store — like the
# svlogd/s6-log pattern, but with a supervisor that survives restarts on BOTH
# sides. systemd creates the FIFO and opens it O_RDWR, holding a read end for as
# long as this socket is up, so the producer can crash, upgrade or restart
# without ever seeing EOF or EPIPE: writes buffer in the kernel pipe and drain
# when it returns.
#
# The service drains the FIFO with `timberfs append --records`, so the producer
# must write a timberfs-records(5) stream — not raw text. That is the intended
# shape here: the producer (e.g. a records-format logging writer) knows its own
# event boundaries and timestamps and frames them explicitly. To archive a
# plain-text source instead, drop --records from the service (systemctl edit,
# see timberfs-log@.service).
#
#   # /run/timberfs must exist first — the shipped tmpfiles.d handles it at boot;
#   # for an immediate first use before a reboot: systemd-tmpfiles --create
#   systemctl enable --now timberfs-log@applogs.socket
#
# Then point a records-format producer at /run/timberfs/applogs.pipe.

[Unit]
Description=timberfs log intake FIFO (%i)
Documentation=https://github.com/torstei/timberfs

[Socket]
ListenFIFO=/run/timberfs/%i.pipe
SocketMode=0660
# REQUIRED for any non-root producer: the FIFO is created root:root 0660, so a
# producer running as another user cannot write it until you set the group to
# one that user belongs to. There is no sane default — the producer's identity
# is site-specific — so set it per instance with a drop-in:
#   systemctl edit timberfs-log@%i.socket
#     [Socket]
#     SocketGroup=myapp
# (SocketUser= likewise if you need to match a specific user.)

# Drop the FIFO node from /run when the socket is stopped.
RemoveOnStop=yes

[Install]
WantedBy=sockets.target