-
-
Notifications
You must be signed in to change notification settings - Fork 756
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Synology installation #719
Comments
Well, you need to have the openssl headers installed (they are needed for compiling software that uses openssl lib). And they need to be at the place it told, see "Looked here:". Besides these, you will also need some other headers files, see the docs of borgbackup for details. |
Instead of trying the source based install, you can also try the single-file binaries (see github releases page), they don't need compiling (but you'll need to have a x86/x64 cpu and a not-too-old glibc). |
btw, if installation on the NAS is too painful, you can also use a network filesystem mounted on the client and just run borg on the client and backup into that mounted fs. running borg as client/server is more efficient, but this method can be used as a fallback in case c/s is not possible. |
Specifically in the case of Synology NAS'es there is also the |
Thanks for the extensive answers, I will try out your solutions and give you feedback. Borg backup on a NAS seems to be a natural fit to me. It would be great to have packages readily available for the 2-3 big names in the NAS market. |
Personally, I use a Ubuntu docker image on my Synology NAS, with openssl, openssh, anacron, and borg installed. Works like a charm! |
As a newcomer, this is a useful topic, as having borgbackup on the NAS provides a layer of protection against ransomware (since the files are stored where a client can't access them.) There are different tiers of Synology NAS models. Some are x86 compatible, others use ARM CPUs, so what might work with a higher end NAS may be tough to do with one of the "j" models. |
If there is some good / proven way to run borg on Synology NASes, I'ld appreciate if someone writes up something short for the FAQ section of our docs. Or puts up a howto somewhere on the web, where we could link to from the FAQ (if not so short). As this is not a borg issue per se, I am closing this. |
@ThomasWaldmann closed is right here. the 64bit latest binary works on 916+ synology. ash-4.3# uname -a You could give us some ARM build here, to support Synology at it's best. Synology has plenty of "armv7l" => 3.2.40 devices |
I use Borgmatic wrapper and Borgbackup binary running on an Ubuntu 1404 machine backing up to a Synology 1813+ (x86) NAS, which is running the same Borgbackup binary. Ubuntu machine backs up to the Synology NAS in minutes, really impressive backup solution. |
@smithjcm how much data in there ? |
Nightly it takes a couple of minutes to add a few hundred megabytes of changes to the 1.75TB backup
A big initial backup took 18 hours
18 hours is a long time but I backup the same files to the same NAS with Duplicity and Duplicity takes a little over twice as long |
25-30 MB/s could already be the limit what the NAS can shovel through an SSH channel, if it has no hardware acceleration. There are some faster crypto options there, I think recent SSH supports poly1305-chach20. |
Hi, @nprncbl can you said more about your method ? I think you mount (read only ?) the shares to backup or mayby all /volume1 as volume in the container ? |
I have a Synology Diskstation 212+ with current Diskstation Version 6.1.1 and i can't get neither sshfs nor borgbackup to run.
I guess i'll have to stick with the rsync with hardlinks solution for a while... |
@mmatiaschek There are a couple of issues you may like to consider in your case:
However, the most elegant solution IMO would be to run everything on the source machine (the machine that you're backing up), as mentioned by @ThomasWaldmann in an earlier comment. To summarise: mount the borg repo (that resides on the Synology) via a suitable mechanism (e.g. CIFS which the 212+ supports out-of-the-box). Then run borg on the source machine, specifying the path to the mounted repo. This should work well. No need to stick with rsync+hardlinks. |
Maybe late to the party, but here are some borg binary compiled for arm (no idea how he did it though, and haven't tried it): |
Found the same after some searching. They do work well! |
🎉 Borg is now officially available for Synology from the SynoCommunity repo: (Still needs a custom build/install of Python3 though, as it requires version 3.5.2, but the latest on the repo is 3.4.1.) |
@noplanman How do you build or install a custom Python 3.5? |
@ppawlak It's very simple! First, get your docker container set up: Next, check which CPU architecture your DSM has: Let's assume you have a DS416. Searching for that on the page, you'll find it under Then, inside your docker container: # List all available toolchains, showing only available ones for your architecture (e.g. "alpine")
$ ls toolchains | grep alpine
# Set the toolchain to be used, which is the DSM version you're running (any version that is available from the previous command):
# make dsm-{DSM_VERSION}
$ make dsm-6.1
# Change into the folder of the package you want to build (e.g. python3)
$ cd spk/python3
# Build for your architecture! (e.g. "alpine"):
# make arch-{ARCHITECTURE}
$ make arch-alpine After the build has finished, you can find the package in the ❗ Note: If you run into permission issues, check here: Then, after Python3 is successfully installed, you can install Borg from the "Community" list in the DSM Package Center. Once that's done, have some well deserved cookies 😋 🍪 |
@noplanman do you know why they went for 3.5.2 instead using 3.4? borg should work with 3.4. |
@ThomasWaldmann That's a very good question, I don't know. I'll try to lower the constraint to the SynoCommunity's Python 3 (v3.4.1-4) and build Borg and test it 👍 |
Maybe someone should also push the python maintainer of SynoCommunity a bit. :) Usually the early dot releases like .0 or .1 are worse than just taking the current one, which is 3.4.8. The python devs are rather careful, so compatibility issues are not expected, but bug and security fixes of the most recent dot release are nice to have (and bugs in early dot releases are sometimes really annoying). |
Lowering the constraint did not work 😕 But, I guess it shouldn't really be an issue once they update their official Python 3 package to 3.5, then this custom build and install will become unnecessary. |
I followed the instructions of SynoCommunity above and successfully installed BorgBackup on Synology DiskStation. A few words: one could create a new user with minimal privileges in DiskStation for backup purpose only. However, by default only users in For key-based SSH login, another trick is needed. If you use With these two tricks, a DSM is no different than a normal Linux box. |
On more thing: |
@wzyboy No need to build Python3 and Borg yourself, as the official packages should be available. Best to take the officially signed ones! What DiskStation do you have? |
@noplanman Yes. I tried the offical single-file-binary and it runs well on the DiskStation. But I prefer the SynoCommunity package because it is supposed to be easier to update. I do not know the exact model of the DiskStation as it's an office property (I never had a close look at it). But AFAIK it's an x86_64 model with 4 disks and 8 GiB RAM. |
@noplanman Hmm, I read your comments above again. You said you need a custom build of Python. But today after I added the SynoCommunity repo and clicked "Install" on "Borg", the package manager installed "Python3" as a dependency automatically for me. It seems that they have already updated the "Python3" package to Python 3.5:
|
@wzyboy Right, I must have not been clear enough in my comment. But as you've explained, that's what you have already, so perfect! 👍 And yes, installing a package that depends on another one, will install the dependency automatically. I need to look into the SSH tip you mentioned above, which I'm already very grateful for, as I might be running into that when I start playing with it 😉 |
Just pointing to the latest PR regarding a BorgBackup update for Synology: |
But DSM will reset |
@scruel For that you can define a scheduled task to run as "root" on "Boot-up". My task looks like this, for the user echo -e "$(cat /etc/passwd | grep -v ^backupper)\nbackupper:x:1032:100:Backup User:$(echo ~backupper):/bin/sh" > /etc/passwd Of course you'll need to adapt to your needs. |
Hello,
I tried installing borgbackup on a Synology NAS.
I got an error about OpenSSL headers
Any clue?
The text was updated successfully, but these errors were encountered: