2022-07-13 13:15:03 +02:00
|
|
|
.. _miscellaneous:
|
|
|
|
|
2017-11-09 20:33:09 +01:00
|
|
|
Miscellaneous
|
|
|
|
=============
|
|
|
|
|
2017-11-09 21:23:45 +01:00
|
|
|
.. _conf-runtime-directories:
|
|
|
|
|
2017-11-09 20:33:09 +01:00
|
|
|
Runtime Directories & UNIX Sockets
|
|
|
|
----------------------------------
|
|
|
|
|
2019-07-26 21:12:21 +02:00
|
|
|
The zrepl daemon needs to open various UNIX sockets in a runtime directory:
|
2017-11-09 20:33:09 +01:00
|
|
|
|
2019-07-26 21:12:21 +02:00
|
|
|
* a ``control`` socket that the CLI commands use to interact with the daemon
|
|
|
|
* the :ref:`transport-ssh+stdinserver` listener opens one socket per configured client, named after ``client_identity`` parameter
|
2017-11-09 20:33:09 +01:00
|
|
|
|
2019-07-26 21:12:21 +02:00
|
|
|
There is no authentication on these sockets except the UNIX permissions.
|
|
|
|
The zrepl daemon will refuse to bind any of the above sockets in a directory that is world-accessible.
|
2017-11-09 20:33:09 +01:00
|
|
|
|
2019-07-26 21:12:21 +02:00
|
|
|
The following sections of the ``global`` config shows the default paths.
|
|
|
|
The shell script below shows how the default runtime directory can be created.
|
2017-11-09 20:33:09 +01:00
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
global:
|
|
|
|
control:
|
|
|
|
sockpath: /var/run/zrepl/control
|
|
|
|
serve:
|
|
|
|
stdinserver:
|
|
|
|
sockdir: /var/run/zrepl/stdinserver
|
|
|
|
|
|
|
|
|
2019-07-26 21:12:21 +02:00
|
|
|
::
|
|
|
|
|
|
|
|
mkdir -p /var/run/zrepl/stdinserver
|
|
|
|
chmod -R 0700 /var/run/zrepl
|
|
|
|
|
|
|
|
|
2017-11-09 20:33:09 +01:00
|
|
|
Durations & Intervals
|
|
|
|
---------------------
|
|
|
|
|
|
|
|
Interval & duration fields in job definitions, pruning configurations, etc. must match the following regex:
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
var durationStringRegex *regexp.Regexp = regexp.MustCompile(`^\s*(\d+)\s*(s|m|h|d|w)\s*$`)
|
|
|
|
// s = second, m = minute, h = hour, d = day, w = week (7 days)
|