Skip to content

Commit

Permalink
feedback 09: add systemd note
Browse files Browse the repository at this point in the history
  • Loading branch information
BenediktSeidl committed Apr 24, 2020
1 parent 4b1182b commit b68ea52
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/deployment/pull-backup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,12 @@ standard input and output available to a unix socket::

borg-server:~$ socat UNIX-LISTEN:/run/borg/reponame.sock,fork EXEC:"borg serve --append-only --restrict-to-path /path/to/repo"

.. note::
When used in production you may also use a systemd service together with a
socket_ configuration file to start the borg serve command.

.. _socket: https://www.freedesktop.org/software/systemd/man/systemd.socket.html

Socat will wait until a connection is opened. Then socat will execute the
command given, redirecting Standard Input and Output to the unix socket. The
optional arguments for ``borg serve`` are not necessary but a sane default.
Expand Down

1 comment on commit b68ea52

@elho
Copy link
Contributor

@elho elho commented on b68ea52 Apr 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have all the correct terminology in the linked documentation, so do use it. Also, mentioning that it replaces socat on the server can not hurt and do not forget the formatting of borg serve. So like:

When used in production you may also use systemd socket-based activation instead of socat on the server side. You would wrap the borg serve command in a service unit and configure a matching socket unit to start the service whenever a client connects to the socket.

Please sign in to comment.