Synology package

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?

    #cap_add:
    #  - 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 (https://github.com/adn77/spksrc/commit/899720af3eacc469c18bc3650767c48e5ac7c72e) 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?

Hi,
packages 2.4.15 for DSM 7 https://github.com/josef109/spksrc/releases/tag/2.4.15
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

2 Likes

Hi all, not sure this is the right place to ask but – what version of spksrc should I get for a very old DS411, with CPU Marvell Kirkwood 88F6282 and DSM version 4.3?

(And what would be a compatible client version…)

I tried the latest “88f6281-6.1” package which I sort of inferred from another thread that it might be the right version for my CPU, it installs, but does not start (obvious I guess, since it’s for DSM 7).

Just wondering whether the 7.0 package still runs OK on 7.1… Our work NAS has started trying to autoupdate, but it fails. Manual install shows urbackup as possibly not compatible (I think that’s what it’s trying to tell me anyway).

For the person above with DSM4 - you probably need to try the Synocommunity Debian chroot method instead. That should work fine on DSM4, but the package was removed from the synocommunity repos when DSM6 came out due to compatibility issues. I’m not sure how tricky it would be to get it installed now.

2 Likes

How would this look in the docker-compose? I want to use docker instead of the package, but having issues. For instance, I installed once, and removed it however it wouldn’t allow me to remove one of the test folders A and B. Its like I completely don’t have permissions to remove these. (Using portainer). I haven’t been able to get it to route directly into the directory I setup. Thanks in advance.

I don’t know - I defined them in the setup of the container in the Synology Docker app, resulting in this:

Actually your notes were a big help. The only issue i have now is the folder that wont delete. Ive tried everything. I went ahead and created new docker-compose and script for Synology to run to build. Ill share if anyone is interested

Urbackup Server 2.5.27
https://github.com/josef109/spksrc/releases/tag/2.5.27

2 Likes

Hey I appreciate. I’m going to make sure to share this.

thanks josef109 for your job.
synology package 2.5.27 works here on DSM 7.1 Update1 + DSM 7.1.1 Update 1
on virtual DS3622xs+ ( broadwellnk arch)
edit: btrfs snapshots isn’t supported, isn’t it ?
( snapshot help test works if run from root and if backupfolder file is copied to /etc/urbackup/ )
tried on a real DS216+ (braswell arch) on DSM 7.1 Update4, install ok , it start but stop.
Can I find a log to investigate ?

btrfs work not because to test if available, urbackup uses a function witch needs root access. This is not allowed in synology’s opinion

urbackup server 2.5.30 with enabled ldap

https://github.com/josef109/spksrc/releases/tag/2.5.30

btrfs snaphots seems to work if we grant root privilege to urbackup package
( credits to https://community.synology.com/enu/forum/20/post/140589 )
sed -i ‘s/package/root/g’ /var/packages/urbackup/conf/privilege
then run manually as root :
/volume1/@appstore/urbackup/bin/urbackupsrv run -d -v error -u root

then list btrfs snapshots :
btrfs subvolume list /volume1
ID 256 gen 204 top level 5 path @syno
ID 259 gen 202 top level 256 path @apphome/urbackup/CLIENT1/230410-0004

Hello,
The UrBackup is not being listed on the SynoCommunity repository, how cooud I find the spk package to install it manually?

Other doubt: I have a UrBackup server running well for years and I would like to backup Synology directories, tried to mount them via NFS, but the local directory from UrBackup server is filling up and do not complete the backup. So I’m thinking to have UrBackup client on the Synology to backup them directly, is there a way to have it?

tried 2.5.30 today, on a DS216+ (braswell arch) on DSM 7.1
error : “Raising maximum file descriptor to 65535 failed. This may cause problems with many clients. (errno=1)
Raising nice-ceiling to 35 failed. (errno=1)”
if I run it as root , only error “Segmentation fault”