Keeping Your Sanity with Unison
Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
|
Version 1.0
Author: Joe Topjian <joe [at] adminspotting [dot] net> I hate it when I have two identical scripts on two servers and have to make changes to each one or when I want to copy something to my powerbook and have to manually copy the modified version back to the fileserver when I am done. While other versioning tools like subversion handle this extremely well, they are overkill for my needs. Unison gives me the simplicity to do exactly what I want with no hassle. Hence, it keeps my sanity! Unison runs on Unix, Windows, and MacOS X. Personally, I use it on Debian and OS X. To install on Debian, just type: apt-get install unison
On OS X, I use DarwinPorts and install it like so: sudo port install unison
Like I mentioned above, running Unison is incredibly easy. Lets say you have a directory called "scripts" and you wanted to sync it with another directory called "scripts-backup". You would do this: unison scripts scripts-backup
Unison will notice the first time you sync something and mention it to you. It will then run though the directory and files and ask you if you want to sync it or not. To accept the sync, just hit enter or else ? for help. This is all well and fine if you want to sync something on the same computer, but what about remotely? Unison supports socket and SSH transfers -- SSH being the prefered. To sync something remotely, do: unison scripts
ssh://server//path/to/scripts-backup
You'll be promted for SSH authentication and then the rest is the same as if you were to run it locally. But wait, there's more! Typing all those paths over and over gets tedious.. let's make a few shortcuts. Create a directory called .unison in your home directory. Inside, create a file called "scripts.prf". Inside scripts.prf have: root = /path/to/scripts
root = ssh://server//path/to/scripts-backup Now all you need to do is type: unison scripts
And Unison will do the rest for you. That's really all you need to get started with the basics. The preference file can get a lot more detailed and all of those details are described in the Unison Manual.
Original location of this document: http://adminspotting.net/howtos/unison.html
|
Sponsored Links:
Turn your desk phone and mobile phone into one with Sprint Mobile Integration.
www.seamlessenterprise.com
One number. One voicemail. Seize the lead. Sprint Mobile Integration.
www.seamlessenterprise.com
One Number. One Voicemail.
Make it easier for clients to reach you. Turn your desk phone and mobile phone into one with Sprint Mobile Integration.
www.seamlessenterprise.com
One number. One voicemail. Sprint Mobile Integration.
www.seamlessenterprise.com
AT&T Synaptic Compute as a Service. Boost your power on demand.
Trial: IBM Cognos Express Reporting, Analysis & Planning
www.seamlessenterprise.com
One number. One voicemail. Seize the lead. Sprint Mobile Integration.
www.seamlessenterprise.com
One Number. One Voicemail.
Make it easier for clients to reach you. Turn your desk phone and mobile phone into one with Sprint Mobile Integration.
www.seamlessenterprise.com
One number. One voicemail. Sprint Mobile Integration.
www.seamlessenterprise.com
AT&T Synaptic Compute as a Service. Boost your power on demand.
Trial: IBM Cognos Express Reporting, Analysis & Planning







Recent comments
13 hours 11 min ago
15 hours 12 min ago
18 hours 24 min ago
20 hours 43 min ago
21 hours 53 min ago
23 hours 11 min ago
1 day 3 hours ago
1 day 6 hours ago
1 day 7 hours ago
1 day 21 hours ago