lionceau Posted December 16, 2016 Share Posted December 16, 2016 Hello, I'm new to unraid and still in my evaluation/trial phase. So far I'm very humbled by the functionality and ease of use compared to my Mac Mini homeserver running OS X. One service that I depend on is Unison, a CLI file synchronisation service very similar to rsync but faster and with better conflict management. On my current (non-unraid) server I use unison with a ssh for secure file syncing. It's fast, full-featured, stable, cross platform and much more dependable than syncthing, Bittorrentsync/Resilio and comparable apps that I've tried. https://www.cis.upenn.edu/~bcpierce/unison/ I couldn't find anything related to Unison in the Community App program. There's an image on dockerhub but that's for a different purpose and doesn't include SSH. Where do I begin setting up a personalised Docker container for this? The developer is no longer adding features, only occasional maintenance fixes, so updates to unison are rare. That shouldn't make it too hard to maintain it for myself. Or alternatively is there a way to pay a developer to create a unison template for unraid? If all else fails I could make a ubuntu VM for unison but as I understand it docker is a "cleaner" solution with less overhead. Another question related to Docker: I keep reading that unraid is not meant to face the internet because it wasn't designed with security in mind. I understand this. Does this recommendation also affect services running inside docker containers or is the docker abstraction sufficient to make the service secure enough to face the internet? Quote Link to comment
WannaTheater Posted March 2, 2017 Share Posted March 2, 2017 I would love to have this functionality as well. I use unison to sync data between 3 PCs in the house.... ironically enough I only use unRaid for media, and not any of my critical data. This, of course, has led to data sprawl, having it in multiple PCs.... My goal would be to move my critical data to unRaid, and have unRaid synced to the PCs. Quote Link to comment
[email protected] Posted April 30, 2017 Share Posted April 30, 2017 Did anyone ever find a way? I see older posts about this, but I am running version 6 and would like to use unison instead of rsync. Quote Link to comment
MrCrispy Posted May 1, 2017 Share Posted May 1, 2017 I'd never heard of Unison till now, thanks. You said its more dependable than syncthing, can you elaborate? I see some dockers like https://github.com/onnimonni/docker-unison, https://hub.docker.com/r/clesch/ssh-unison/, you could ask Squid to add them to CA, or make a template, maybe there's a guide somewhere? Quote Link to comment
1812 Posted May 1, 2017 Share Posted May 1, 2017 14 minutes ago, MrCrispy said: I'd never heard of Unison till now, thanks. You said its more dependable than syncthing, can you elaborate? I see some dockers like https://github.com/onnimonni/docker-unison, https://hub.docker.com/r/clesch/ssh-unison/, you could ask Squid to add them to CA, or make a template, maybe there's a guide somewhere? You can download dockers from docerhub. Searching for Unision in the apps tab, then when noting comes up, look in the middle of the screen for the button that say "Get more results from DockerHub" Quote Link to comment
WannaTheater Posted May 1, 2017 Share Posted May 1, 2017 I was able to get Unison running, but did not use a docker container. I followed this thread: It seems to work fine. I did have an issue unmounting drives last week, which appeared to go away after I killed the Unison process running on unRaid, but still have to determine if that is the actual cause of the issue. Quote Link to comment
WannaTheater Posted May 1, 2017 Share Posted May 1, 2017 Scratch that- It looks like I am having issues. I would love to see a supported working configuration. Quote Link to comment
WannaTheater Posted October 2, 2017 Share Posted October 2, 2017 So I am revisiting this. Some time ago I managed to get Unison working (syncing from PC to Unraid), but there was an issue- Basically I could not shut down unraid unless I telneted over to unraid and manually killed the Unison process. This to me is not really a good solution. So I started investigating how to install Unison in a docker container. In combination with the LimeTech Docker "user guide", I tried this: https://github.com/vikduf/docker-unison, since I could find the template repository it was under (https://github.com/vikduf/docker-templates) But when creating the container, I received an error stating it was out of date. So I found this: https://github.com/leighmcculloch/docker-unison Unfortunately, I can't find it in a template repository, which deviates from the LimeTech Docker "user guide." Not knowing any details about Docker, I am lost as how to proceed, and don't want to mess up unraid array. Once installed, I know how to use unison... I just can't figure out how to get it installed. Anyone willing to tackle this, or provide some pointers? Thanks! Quote Link to comment
WannaTheater Posted March 12, 2018 Share Posted March 12, 2018 It has been awhile, so I thought I would revisit this- Are there any Unraid/Docker gurus that are willing to tackle this? Thanks Quote Link to comment
DZMM Posted March 12, 2018 Share Posted March 12, 2018 As an alternative, have you considered nextcloud? I use nextcloud to sync files between unraid, windows PCs and also my mobiles. It works brilliantly and I love that with the mobile app I have access to all files, including those not synced Quote Link to comment
WannaTheater Posted March 12, 2018 Share Posted March 12, 2018 Thank you for the recommendation. I will look a little deeper. Seems like it requires me to build another server. I continue to use Unison, as it has been my go-to for years keeping multiple PCs in sync, with primary data on a local PC. (unRaid is used for movie storage, which I do not consider to be all that critical). I would like to migrate ALL data over to UNRAID, and keep it refreshed on a weekly basis through UNISON (as I do with my other PCs). Quote Link to comment
DZMM Posted March 12, 2018 Share Posted March 12, 2018 (edited) nextcloud runs in a docker so you don't need another server Edited March 12, 2018 by DZMM Quote Link to comment
WannaTheater Posted March 13, 2018 Share Posted March 13, 2018 Great information. I will check it out when I get some time. But for now, Unison appears to be working. It is not running in a docker container- Just as a process that starts up at boot time. In a prior version of Unraid, I needed to manually kill the unison process on the unraid server as it was hanging up the shutdown process. That doesn't appear to be an issue anymore. Quote Link to comment
lylavoie Posted November 14, 2019 Share Posted November 14, 2019 Hi All, I saw this (I know its older), and had just worked on getting unison running in a container, but using SSH as the transport instead of the native TCP support. The reason for your issue with "hanging" the umount is because running unison as the server process keeps active connections. The Dockerfile below will build a container that can run unison, but via an SSH connection. It assumes a couple of things: Only 1 SSH user, and that user has a public key based auth. Only sync of one path from the container, "mounted" as a volume from the host The UID/GID values of the user are all synced between the unison client, container, and host. This isn't strictly required. To build this, just run "docker build -t unison-ssh ." in the directory with your public ssh key and the Dockerfile. Note, you should change the username, UID, and GID values as needed. FROM ubuntu:16.04 # Override the UID/GID values, because we need these to line up with the host's file system ENV USERUID=1000 USERGID=100 USERNAME=blah # Get us an updated OS and intall SSH RUN apt-get update && apt-get install -y openssh-server RUN mkdir /var/run/sshd # Install unison application RUN apt-get install unison # Random root password RUN NEW_PASS=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) && echo 'root:${NEW_PASS}' | chpasswd # SSH login fix. Otherwise user is kicked off after login RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd # Create my user RUN useradd --uid 1000 --gid 100 --no-user-group --create-home $USERNAME && mkdir /home/$USERNAME/.ssh && chown $USERUID:$USERGID /home/$USERNAME/.ssh COPY --chown=$USERUID:$USERGID id_rsa.pub /home/$USERNAME/.ssh/authorized_keys # Create the place we're going to get our external sync storage from RUN mkdir /data && chown $USERUID:$USERGID /data VOLUME /data EXPOSE 22 CMD ["/usr/sbin/sshd", "-D"] Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.