Greetings,
I wanted to use for my backup part the rest-server , all good so far until I reached to the systemd service file.
Unit]
Description= Restic Server
After=syslog.target
After=network.target
[Service]
Type=simple
User=www-data
Group=www-data
ExecStart=/usr/bin/rest-server
–path /mnt/backup
–private-repos
–append-only
–prometheus
–log /var/log/restic-server/sessions.log
–tls
–tls-cert /path to cert
–tls-key /path to key
Restart=always
RestartSec=5
StartLimitInterval=0
[Install]
WantedBy=multi-user.target
If I run the ExecStart separate in the shell it works perfectly but via the service exiting with error.
I get this error
systemctl status rest-server.service
● rest-server.service - Restic Server
Loaded: loaded (/etc/systemd/system/rest-server.service; disabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Fri 2020-02-07 22:18:40 EET; 4s ago
Process: 19803 ExecStart=/usr/bin/rest-server --path /mnt/backup --private-repos --append-only --prometheus --log /v
Main PID: 19803 (code=exited, status=1/FAILURE)
Feb 07 22:18:40 b1 systemd[1]: rest-server.service: Failed with result ‘exit-code’.
systemd[1]: rest-server.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: rest-server.service: Unit entered failed state.
systemd[1]: rest-server.service: Failed with result ‘exit-code’.
Any idea where I did wrong and how to get it right ?
I did saw that some used as server Rclone so no idea what to choose here .
Thanks in advance .