So my situation is that I want to my development files - Ruby & PHP - available to all of my machines when I am home and away. When I asked the question before (Mount my Webserver as a drive in Win7/8) I was told to use version control software but I don't want to be downloading a local copy and working on it so that I then have to upload the new version and re-download the new version to all the machines. There's no group of developers here just me and most of my dev/debug issues come from writing code and testing it one machine but then forgetting to update my other machines. Thus I want a sync'd copy of the files on all of my machines.
I was considering using ownCloud on one of my webservers for other reason anyways and gives my Win machines easy access to the files. My Win machines have the ownCloud update client that works like Google Drive's or DropBox's with sync'ing happening on what appears to be a timer. The ownCloud update client on my Ubuntu machines didn't want to install and I'm using a mix of desktop and server versions. So my Ubuntu machines simply mount the ownCloud directory via davfs2 and (in once I get this worked out) they will use rsync on a cron to create a local copy - that way my machines can continue to work if the server with the ownCloud files goes down.
But then I ran across mention of Unison which I'd never heard of before. It seems that Unison is a program meant to do the same thing as differential rsync. Have I misunderstood?
Unison sounds like it is built for syncing files across servers so I wouldn't have to worry about keeping the remote server's mount up and running or re-establishing the mount before executing a differential rsync. However, all of the tutorials I'm finding on Unison suggest that you have to open up SSH to root logins. Maybe I'm worried about nothing but that seems like a bad idea.
- Am I correct that allowing a root login on SSH is a bad idea for security reasons?
- Are there advantages to Unison that I've overlooked?
- Are there issues with rsync that I've overlooked? Such as wiping out my local copy if the mount of the remote server goes down and now the directory looks empty.
- Are there performance advantages to Unison over rsync or vice versa?
- Finally, is there a way to monitor mounts and re-establish automatically if they die? I could use write something to check for specific contents on the mount but that seems prone to problems.