Package Details: urbackup-server 1.4.8-1

Package Base: urbackup-server
Description: Client Server backup system
Upstream URL: http://www.urbackup.org/
Category: system
Licenses: GPL
Submitter: kirpich
Maintainer: k0n24d
Last Packager: k0n24d
Votes: 3
First Submitted: 2012-05-12 17:58
Last Updated: 2015-04-10 12:22

Latest Comments

Comment by k0n24d

2015-06-08 09:37

@skurk also please not that

"PID file /run/urbackup_srv.pid not readable (yet?) after start."

Is not fatal. Systemd will find the pidfile later on:

● urbackup-server.service - UrBackup Client/Server Network Backup System
Loaded: loaded (/usr/lib/systemd/system/urbackup-server.service; disabled; vendor preset: disabled)
Active: active (running) since lun. 2015-06-08 11:13:14 CEST; 18min ago
Process: 24629 ExecStart=/usr/sbin/start_urbackup_server (code=exited, status=0/SUCCESS)
Main PID: 24636 (urbackup_srv)
CGroup: /system.slice/urbackup-server.service
└─24636 /usr/sbin/urbackup_srv --daemon --plugin /usr/lib/liburbackupserver_urlplugin.so --plugin /usr/lib/liburbackupserver_cryptoplugin.so --plugin /usr/lib/liburbackupserver_fsimageplugin.so --plugin /usr/lib/liburbackupserver.so --http_root /var/urbackup/www --workingdir /var --snapshot_helper /usr/bin/urbackup_snapshot_helper --plugin /usr/lib/liburbackupserver_httpserver.so --port 55413 --logfile /var/log/urbackup.log --loglevel warn --http_port 55414 --pidfile /var/run/urbackup_srv.pid --user urbackup

juin 08 11:13:14 yyyy systemd[1]: Starting UrBackup Client/Server Network Backup System...
juin 08 11:13:14 yyyy systemd[1]: PID file /run/urbackup_srv.pid not readable (yet?) after start.
juin 08 11:13:14 yyyy systemd[1]: Started UrBackup Client/Server Network Backup System.

cat /run/urbackup_srv.pid
24636

ps auxwww | urbackup_srv
urbackup 24636 0.0 0.1 528120 15132 ? Sl 11:13 0:00 /usr/sbin/urbackup_srv --daemon --plugin /usr/lib/liburbackupserver_urlplugin.so --plugin /usr/lib/liburbackupserver_cryptoplugin.so --plugin /usr/lib/liburbackupserver_fsimageplugin.so --plugin /usr/lib/liburbackupserver.so --http_root /var/urbackup/www --workingdir /var --snapshot_helper /usr/bin/urbackup_snapshot_helper --plugin /usr/lib/liburbackupserver_httpserver.so --port 55413 --logfile /var/log/urbackup.log --loglevel warn --http_port 55414 --pidfile /var/run/urbackup_srv.pid --user urbackup

Comment by k0n24d

2015-06-08 09:29

@skurk Thanks for pointing these issues out. But I must admit I do not fully agree with your changes - but I'm open to discuss this as I might be wrong ;-)

Regarding /run and /var/run as of https://wiki.archlinux.org/index.php/Arch_filesystem_hierarchy#.2Frun:_Ephemeral_runtime_data /var/run should be a symlink to /run.

Which is indeed a temp fs but I do not understand why that leads to the rest of your changes - like wanting to execute start_urbackup_server as user urbackup ? It is supposed to be run as root which is what permits urbackup_srv among other things to create the pidfile - it then drops privileges to the urbackup user.

So this should not be an issue. Neverless I admit it's not clean. But I think it's better to make the minimum changes to what's provided by upstream: urbackup-server.service and start_urbackup_server are provided in the source file. So I believe it would be better to file a bug upstream.

Regarding your change from network.target to network-online.target: It is strongly recommended not to pull in this target too liberally: for example network server software should generally not pull this in (since server software generally is happy to accept local connections even before any routable network interface is up), it's primary purpose is network client software that cannot operate without network. [see http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/]

Comment by skurk

2015-06-06 08:53

There are some problems with the PID file and systemd service. The first problem is that the PID-file locations are different in the service file and the launch script:

urbackup-server.service = PIDFile=/run/urbackup_srv.pid
start_urbackup_server = PIDFILE="/var/run/urbackup_srv.pid"

This is one of the reasons the server refuses to start and gives the error:
"PID file /run/urbackup_srv.pid not readable (yet?) after start."

The other reason is that /run is a temporary filesystem in Arch so we need to either specify RuntimeDirectory= and RuntimeDirectoryMode= to create the PID-file as user urbackup under $XDG_RUNTIME_DIR (/run/user/UID/), or create and chown a directory for the PID-file under /var/run/ using the systemd service file like so:

[Unit]
Description=UrBackup Client/Server Network Backup System
# If using NetworkManager network-online.target waits until
# network is online and the urBackup server is reachable after
# boot without restarting the service
After=syslog.target network-online.target

[Service]
Type=forking
# Need to specify user and group for PermissionStartOnly to work
User=urbackup
Group=urbackup
NotifyAccess=all
# Execute everything but ExecStart as 'root'
PermissionsStartOnly=true
# Create and chown dir under /var/run to store PID-file for user urbackup
# The dash (-) before mkdir ignores errors
ExecStartPre=-/usr/bin/mkdir /var/run/urbackup
ExecStartPre=/usr/bin/chown -R urbackup:urbackup /var/run/urbackup
# The following is run as user 'urbackup'
ExecStart=/usr/sbin/start_urbackup_server
PIDFile=/var/run/urbackup/urbackup_srv.pid

[Install]
WantedBy=multi-user.target

Comment by k0n24d

2015-02-03 08:55

I made an updated package:
- new version 1.4.7
- corrected various path used during build
- corrected how the system user is managed (no need to build as root)
- use systemd file provided in source package
- install provided manpages
- install provided firewalld system file

https://gist.githubusercontent.com/K0n24d/95e1ff4839147a49aa80/raw/9c5b61c589450100ba602bd949d340a8d7af1e95/PKGBUILD

https://gist.github.com/K0n24d/95e1ff4839147a49aa80/raw/28083ae1eac166bda3e44a902ae6f5522c929d35/urbackup.install

Comment by severach

2014-06-01 16:46

Please remove "-9" from urbackup-server.service. It is not necessary to use -9 to make urbackup stop.

Here's a sample debugging command that will tell you if urbackup is communicating. Change the interface name as needed from "ip addr". Output may take up to 60 seconds to happen.
tcpdump -i enp1s0 -n "portrange 35621-35623"

For those wondering why no combination of tricks in urbackup-server.service will get urbackup to communicate after boot, the problem lies with DHCP. If urbackup comes up before DHCP has obtained an address then urbackup will not communicate until it is stopped and restarted. One solution is to add sleep into /usr/bin/start_urbackup_server or sleep into crontab.

su
crontab -e
@reboot /usr/bin/sleep 30; /usr/bin/systemctl start urbackup-server.service

Sleep has not been reliable for reasons not yet known. What really works is to assign an ip before urbackup starts.

su
systemctl disable urbackup-server.service
crontab -e
@reboot ip addr add 192.168.50.6/24 dev enp1s0; /usr/bin/systemctl start urbackup-server.service

Comment by bruybenj

2014-05-19 22:29

only run it as root i know it not safe but it working for me

Comment by diensthunds

2014-03-22 02:43

Fails to build.
ln: failed to create symbolic link ‘/usr/include/crypto++/cryptopp’: Permission denied

You have to create the ln ahead of time as root, edit the pkgbuild and remove the above line, then continue on. Still fails to build after that as you get a useradd: PAM: Authentication service cannot retrieve authentication info