![]() |
Unison - Powerful file synchronization.
Decided this needs its own thread, so here it goes:
Quick (or not so) compiled (and refreshed, so the previous users please redownload it) Unison 2.27.57 for Maemo - works, program menu item added. Requires ssh or rsh to run via network, the remote computer should also have the same version of Unison installed (most distrbutions have this one (the latest stable) on some repo). Also has local synchronization. First check the site here: http://www.cis.upenn.edu/~bcpierce/unison/ Configuration goes like this: Start unison, it will ask you for local directory to sync, after that for remote directory and method to sync to. You will also need an user name and you can configure passwordless connection the usual way (just remember that you start Unison as user on the tablet, so you need to generate the key for the maemo user and add it on your linux machine authorized_keys for the user you connect with). You can also configure directly the Unison profiles for more advanced options. The Unison documentation can be found here: http://www.cis.upenn.edu/~bcpierce/u...on-manual.html Screenshot of a configured two way sync between N800 and my Eee. Tested, works quite fast. http://www.bundyo.org/maemo/unison/unison.png GTK version /can work like console version too/: http://www.bundyo.org/maemo/unison/u...57-2_armel.deb 1.6mb/4.5mb You can also install it from qole's repository, see this post: http://internettablettalk.com/forums...946#post270946 Have fun :) I want to clarify that I won't try to hildonize it. It is written in OCaml/LablGTK and if some OCaml god steps forward, ports the hildon libs and hildonizes it - please be welcome. :D Console version, if someone wants just that, but it isn't very small too: http://www.bundyo.org/maemo/unison/u...57-2_armel.deb 1.3mb/? |
Re: Unison - Powerful file synchronization.
Hmm, when you click on the shortcut for it, it won't launch. But it launches fine in terminal. Now getting it to work on the other hand. >.<Seems it won't recognize the ssh connection even though it's already been setup for using keys.
|
Re: Unison - Powerful file synchronization.
How do you launch it? What you get if you run start-unison from terminal? What do you mean by an already setup ssh connection?
|
Re: Unison - Powerful file synchronization.
If you run /usr/bin/unison-latest-stable-gtk it will launch. It starts on my N810 after I have created a symbolic link in /usr/bin:
Code:
cd /usr/bin |
Re: Unison - Powerful file synchronization.
Will fix later today.
|
Re: Unison - Powerful file synchronization.
This is definitely something to go into Extras when it is stable. Thanks, Bundyo!
|
Re: Unison - Powerful file synchronization.
Quote:
|
Re: Unison - Powerful file synchronization.
Cool port. Great alternative for rsync or lower layer solutions like ZFS/ODS!
You can also run Unison on the other computer instead. It runs on Linux, MacOSX, Windows, and Solaris. Be careful on OSX; there is also a Usenet reader called Unison for OSX. It is interesting what gives a better performance; running Unison local or running Unison remote? Compliment it with SSHFS/SMBFS to access files you only want to access over network connection instead of copying. You can even use it to synchronize settings of applications or make sure N8x0-related files on your desktop or server get copied to the NIT. For example you place new backgrounds in ~/n8x0/backgrounds and they get auto available on your NIT. However because there is no master/slave this can be difficult. What happens when there are changes in the same file on both computers? It has to merge them; this can create trouble, and often requires manual intervention. Last, I wonder about the impact on performance. Using SSH for this on a embedded device is probably a resource hog. |
Re: Unison - Powerful file synchronization.
You can specify in the profile either a program to merge specific files with it or a direction for unconditional copy. There are more complicated rules to do the syncing, too bad they can't be controlled from the GUI. Then again you will seldom need to change them more than once if you plan carefully.
The impact on performance is serious since it employs several processes to do the copying. However many changes are seldom if you sync often and it is fast with the default settings. |
Re: Unison - Powerful file synchronization.
Fixed the symlinks and reuploaded the package.
|
Re: Unison - Powerful file synchronization.
Has anyone gotteen ssh to work? Also do you need unison open on both ends for it to work?
|
Re: Unison - Powerful file synchronization.
Unison is required one one of the computers just like rsync is required on one computer. But the computer with Unison would need SSH client, and the other computer SSH server. At least thats how it goes with rsync. What is faster?
Can Unison also copy and then rename the new file file filename.1? If its a binary it shouldn't try to compare them, but if its a text file it could do that indeed. How fast is this when copying many small files? Is then something like ControlMaster required? I think its pretty neat although there is no abstraction. We also have some server-side syncing with IMAP and Weave (for Mozilla browsers). |
Re: Unison - Powerful file synchronization.
Unison through passwordless ssh works for me great and fast, though I'm starting it from the tablet, not from the laptop. I'll try the other way round and tell you how it goes. I still do think that the documentation is worth taking a look at.
As for the requirements - you NEED to have Unison installed on both machines as well as ssh on both (client or server depends on what you want to do). It doesn't need to be started on both, just start it on one of them and it will log on the other one and start its copy there automatically tasking it with providing sync info. Dunno how fast it is exactly, but it maximizes the connection by running several processes. It can probably rename the files too, just check the docs. |
Re: Unison - Powerful file synchronization.
Just checked the reverse connection - from my laptop to n800 - works beautifully. Copied 26 files in about 10 dirs structure amounting to 800kb for about 4 seconds through wifi and ssh. No ControlMaster AFAICS, unless it is enabled by default.
|
Re: Unison - Powerful file synchronization.
Oh I put unison-gtk into my repository as well, see my post under Tear 0.3 for repo details.
|
Re: Unison - Powerful file synchronization.
Thanks it works now! I guess it was because there was no link in /usr/bin/ so the other side of unison didn't know where to find it. I'm also assuming that because I don't have OpenSSH server installed on my laptop that I can't run Unison from the tablet and have it sync to my laptop. I can only do it the other way (running it from my laptop since the tablet has the OpenSSH server).
|
Re: Unison - Powerful file synchronization.
Quote:
It's useable and everything, I'd just like to know how you did it, considering the absence of ocamlopt for armel etc. |
Re: Unison - Powerful file synchronization.
I just compiled unison for the N900, basically untested, so no warranties and all... just a unison binary, text-ui only:
Code:
~ user@StrankN900 $ unison -version For the record, the compilation method: I needed to compile ocaml directly from svn in the armel scratchbox since only the svn version can give you an ocamlopt native compiler for the armel architecture (EABI rather than the old arm). Then compiled unison from a several weeks old svn snapshot (since this is the version I also use on my other machines). cheers |
Re: Unison - Powerful file synchronization.
thanks, using it to sync conboy/tomboy.
my first install, i got: Setting up unison-gtk (2.27.57-2) ... /var/lib/dpkg/info/unison-gtk.postinst: line 8: maemo-select-menu-location: not found i did a second install, no error messages. however, i can't find an icon for it, although using "ubuntu desktop client - n900 server" works; executing unison from n900 terminal brings up the unison screen(although i didn't go further than this). |
Re: Unison - Powerful file synchronization.
The GTK+ version is for N8x0, hence the error. It should probably work on N900 nevertheless. There should be an icon, try restarting.
|
Re: Unison - Powerful file synchronization.
reboot it, still no icon.
i can unison on n900 terminal; i usually unison from my pc or laptop, works for me. thanks. |
Re: Unison - Powerful file synchronization.
Quote:
|
Re: Unison - Powerful file synchronization.
I don't think so, due to it being written in OCaml/LablGTK :(
|
Re: Unison - Powerful file synchronization.
Quote:
|
Re: Unison - Powerful file synchronization.
Its still in OCaml :)
|
Re: Unison - Powerful file synchronization.
Quote:
|
Re: Unison - Powerful file synchronization.
Not that its not possible to get it in extras-devel, but it will remain there and I don't want to get OCaml in the repo, prefer someone more knowledgeable in that area to do it properly.
|
Re: Unison - Powerful file synchronization.
Hopefully someone rewrites it using something more mainstream like PyGTK or pyqt :)
|
Re: Unison - Powerful file synchronization.
How are you guys handling the problem of "different versions"?
You have a versio on your desktop and and older version on the N900. They don't talk to each other... I have even suggested the author (upstream) to try to handle this situation, but I don't even know if he has read my message. |
Re: Unison - Powerful file synchronization.
Quote:
In practice, that means that you need to update unison on all your machines at the same time, and that's also why I prefer a single binary on my local path rather than a repository where selecting a specific version is not intuitive. Not that I would mind if someone manages to get an automated build infrastructure for OCaml+GTK working... ;) |
Re: Unison - Powerful file synchronization.
Hey all n900 lovers!
First of all i would like to say that im a Noob so this little "how to" comes with no guarrantee. But it worked allright for me :) I have looked for different solutions of sync folders on my n900 and windows 7, windows xp, and linux machines. Im sure there are many solutions for different needs but this was best for me. I think Unison is a very good program since you can modify the syncing process in detail, and the chance of destroying somthing is not that great as with other solutions.. A big thanks to all people who have contributed in different ways on blogs, forum etc to this. This outline comes from different sources and i have installed it on a windows 7 64bit PC along with my n900 and it is SSH password enabled. My n900 has PR1.2, OpenSSH server, titans Power kernel v37 installed. On the n900: First read through this post (wich we are in) http://talk.maemo.org/showthread.php?t=27426 grab this from bundyo to your n900: http://www.bundyo.org/maemo/unison/u...57-2_armel.deb I installed it via xterm: Code:
sudo gainroot I did not and I repeat I did NOT find any icon to start unison in app manager. Start unison from xterm with simply typing: Code:
unison-gtk http://www.cis.upenn.edu/~bcpierce/u...57-manual.html Here you can get some screenshoots and also how to use Putty with it. I did NOT use Putty: http://www.minezone.org/wiki/MVance/FileSyncingHowTo my settings were: local directory (n900) /home/user/MyDocs/.documents second directory (W7) c:\n900 filled in SHH Hos= ip address tom my W7 PC user left blank I left out port = blank I actually dont know (since im a Noob :)) if setting up unison-gtk is required in this manner at N900 side, still i did this way. Then start OpenSSH server on n900 On Windows 7 PC: Unison binaries for windows was hard to find at least for me. And im not into compiling. Via this thread (http://marc.info/?l=unison-users&m=120153269217850&w=2) I found a compiled version of Unison for windows who was the same version as for n900, so grab this version: http://alan.petitepomme.net/projets/....27.57-Gtk.zip then grab GTK runtime (as mentioned in same thread) http://sourceforge.net/projects/pidg...b.exe/download Install GTK runtime first. Then unpack Unison-2.27.57-Gtk.zip copy "Unison-2.27.57 Gtk+.exe" to runtime folder and make a shortcut to it on desktop. Runtime folder should be somthing like C:\Program Files (x86)\Common Files\GTK\2.0\bin Now you need SSH support. In my case to get Password for openSSH to work i did this: First i tried ssh.exe(http://www.wischik.com/lu/programmer/unison-ssh.html) but this SSH.exe had not support for password. But in the commentaries of the same page there was a solution. I downloaded: ftp://ftp.ox.ac.uk/pub/comp/security...ient-3.2.9.exe and istalled. In the installation folder i took SSH2.exe and copied it to C:\Program Files (x86)\Common Files\GTK\2.0\bin and renamed it to ssh.exe You might have to run this like they suggest once to sort keys out like this Code:
ssh root@192.168.x.x(ip on n900) Now run Unison-GTK from desktop and you will have the same options as with n900 local directory: is on PC for me c:\n900 second directory: would be on n900 /home/user/MyDocs/.documents host: the ip to your n900 (this will work over your local wifi net, via your GPRS distributor i dont know) user:root port: i left it blank SSH is marked When you run it there will be a black console in the background where tou type the password to your OpenSSH server on n900. And voila! There you go synchronisations starts! Im sure there are questions on various parts on this but im not the right guy to ask, but there are several people on this forum who have very good knowledge so if you want to change or modify these instructions feel completly free to do so in the benifit of other users. I love my n900 and i hope you do too :)) |
Re: Unison - Powerful file synchronization.
I just come to think of is there any easy way to compile unison in Windows? Could be useful if wanted to upgrade.
Edit: Have succesfully installed on two windows xp machines. I can now instantly update folders on all machines with new files, document edits, when closed work via n900 or on PC:D |
Re: Unison - Powerful file synchronization.
hi,
anybody know if unison compiled version 2.32 available for n900? thanks update: i found it at http://fuuko.libferris.com/maemo/n900/repository/ |
Re: Unison - Powerful file synchronization.
Finally!
I was hoping for this application on my N900 |
Re: Unison - Powerful file synchronization.
Can somebody explain how unison works over ssh?
I have an always on ARM based NAS device with only rsync installed. I want this to be my master storage device to which everything else is synced. Problem is I'd have to compile unison on my NAS which is a real pain if unison needs to be on both the "host" and "client". So a possible solution was to use rsync only, with rsync --rsh=ssh -aizuKL both ways. Do you see any problems with this? |
Re: Unison - Powerful file synchronization.
Any tips on compiling the current version of Unison for N900? Arch Linux skipped 2.38.x entirely, so I can't get matching versions between my laptop and N900.
|
Re: Unison - Powerful file synchronization.
check debian arm deb's. They won't install but I managed to run 2.32 by unpacking the deb in home and running the binary, maybe it works with newer versions. In windows, there is a problem with unicode in older versions but I used cygwin and all is fine. I seem to find best compatibility between distros with 2.32 though.
|
Re: Unison - Powerful file synchronization.
Quote:
unison works even without being installed in one of the machines but it requires another machine to have a server installation, which uses the unisonless machine as storage over ftp (IIRC) which can be tunnelled over ssh. in normal mode it just ssh's to the other machine and runs the unison binary there communicating with it |
Re: Unison - Powerful file synchronization.
Thanks qwazix. I had been waiting almost a year for a reply :)
I've been getting by with a rsync script but that problem did pop up quite a bit. I had to make sure I deleted files on both sides otherwise it would keep recreating it. I will take a look at installing unison on another machine. Thanks again for the advice. |
Re: Unison - Powerful file synchronization.
oh, I hadn't noticed the date, I hadn't seen this thread before it popped in the active topics. As I am using unison pretty successfully for a month or two now on two ubuntu boxes the N900 and a W7 pc I thought I'd hop in.
|
All times are GMT. The time now is 02:13. |
vBulletin® Version 3.8.8