Synology package

Like this

Here is the new link :grinning:



Thanks for putting this together; so far I have been using Urbackup Server inside Docker inside my Synology - and generally it has worked well.

I’m a bit puzzled as how to best move forward though:

  • Inside Docker, I can update to the latest Urbackup Server release as I choose;
  • With the spk release, it looks like I’m limited to whatever build is available in that format - but it looks like it has access to the BTRFS advantages;
  • I’m also a bit wary as to how cleanly the spk can be removed from the NAS, should I choose to.

Any advice that Those Who Know can impart?


Never change a running system :wink: I guess not all Synologies support docker?

I don’t think it sets /etc/urbackup/backupfolder, so btrfs support doesn’t work, correct?

Haha! Well - I’ve actually not been using it for a while, whilst the macOS client issues get sorted out - but I’d been happy with the server side running inside Docker when I was running it. :slight_smile: I’ll likely be blowing away my current setup and starting again from scratch, when I get to it.

I’m no Docker expert, but I’ve got the following paths linked to /volume1/docker inside the NAS:

/volume1/docker/urbackup-server/log         /var/log
/volume1/docker/urbackup-server/database    /var/urbackup
/volume1/docker/urbackup-server/backups     /backups

…with my Settings > Backup Storage Path set to /backups.

In the startup log, I see this:

2020-06-18 13:02:57: Image mounting disabled: TEST FAILED: guestmount is missing (libguestfs-tools)
2020-06-18 13:02:57: Backup destination cannot handle subvolumes and snapshots. Snapshots disabled.

(I haven’t yet tried installing libguestfs-tools, as I have no use for image backups at present.)
I don’t know if the BTRFS functionality would get presented to a Docker container - but from what you’ve written above, it looks like btrfs-tools would have to be installed anyway?


Hi, can you post a new package for 2.4.13 ?
Thanks. :wink:

yes in the next few days, after my hollyday :grinning:

Thanks ! :+1:

ready :grinning:

Thank you ! :pray:

Hi @josef109,

I installed your package and it seems to work fine, unfortunately the libcurl library within the package does not support ldap protocol, so the LDAP/AD connection cannot be configured. Is it possible to build the package with ldap support?

By the way, the native curl library on the NAS has ldap support, why not using it directly?


how can i run something like ./urbackupsrv remove-unkown on Synlogic?

if i run on termial with root the following error

ash-4.3# ./urbackupsrv remove-unknown
2021-04-30 09:39:29: ERROR: Cannot get uid and gid of user “urbackup” -1. Errno: 0

@josef: Is there any chance, that the package will be updated for being used on DSM 7? I updated my synology without checking if your urbackup package would work and now it is no longer working.

I am still working with DSM6 at the moment.
Currently, I can not yet judge how complex the change will be.
In the next few days I will test it.

Okay! In the meanwhile I managed to setup a docker server on DSM7. So far backing up windows and linux machines works fine, however, I am not quite sure if the whole functionality is given… I have not tried to restore backups so far.

On startup of the server it tries as BTRFS test snapshot, which failes (inapropriate iotcl for device). Moreover the “guestmount is missing”.

I am not sure if this is due to launching the server as container via docker, or if it is a problem due to the file system structure of synology (I think they do not use pristine BTRFS but with LVM).

Do you know if your SPK package version is also strugging with these issues and are they serious?

I would be very interested in this as well… I’m thinking about getting a Synology at some point down the road and would like to just carry over my Backups. @aradhir: Did you make sure to uncomment the following lines in your docker-compose script?

    #  - SYS_ADMIN   

Or if you ran it with a command (I really don’t know how docker works on Synology), did you add --cap-add SYS_ADMIN ?

I just used the Docker Interface in the Synology Webmanagement to install the image directly from dockerhub and adjusted the user and group ID settings for proper access/rights management. I actually do not know how docker containers / images are managed in the background. Maybe you can find information in the Synology knowledge database.

Thanks for the reply! I’ll try read up on it. The two commands i asked you to try would enable BTRFS support for docker as per documentation. If you didn’t set this, BTRFS would not be available in the Container.

First I tried building an SPK package for DSM7 which turned out to be quite a hustle ( as there doesn’t seem to be a way to run anything as root in DSM7.

Since I am used to do a granular restore of content in disk images I wanted to get guestmount working as well… the dependencies are truly insane! It runs a QEMU(!!!) no way would I be able to package that nor cross-compile (well I am on denverton :slight_smile: ). That’s probably why the --mount-vhd configure option was not selected in @josef109’s package.

So my next try was Urbackup in Docker which installed very smoothly. The followed hint about the SYS_ADMIN capability.
Debugging the BTRFS snapshot issue I found that one can use the /sbin/btrfs binary in the container /bin/btrfs.
To do that in purely in the UI you have to first copy /sbin/btrfs to a location below homes (e.g. homes/urbackup/btrfs). Next you can map it as “File” to “/bin/btrfs” (note the directory, it’s not /sbin!)

With so much positiveness I tried installing libguestfs-tools into the container (build my own image based on uroni/urbackup:latest). I extracted the Linux kernel from the DSM_*_42218.pat and mounted it as /boot/vmlinuz-4.4.180±x86_64
The modules are mounted as /lib/modules:/lib/modules/4.4.180+
I tried mapping loop and fuse devices but ending up to be running the container “–privileged”.
… but still the guestmount just doesn’t work :frowning:
The command guestmount -r -n --format=raw -a /dev/loop0 -o kernel_cache -o allow_root -m /dev/sda /volume1/homes/urbackup/backups/mnt just doesn’t return.

Is there any sane way to get the guestmount working in Synology?

packages 2.4.15 for DSM 7
Attention, i have not testet the packages in all variants.
Due restrictions from Synology, the packages can no longer run with root privileges. The backup directory was fixed to /volume1/@apphome/urbackup. Please test, before update existing installation