So I want to synchronize my work computer and home computer, both of which are running Ubuntu 8.04 Hardy Heron. When I say "synchronize", I mean that I want all the files in my user profile for each machine to be the same. This includes Firefox bookmarks, Pidgin plugins, etc.
Also, since I have root access on both machines, I want the packages lists to be identical. That is to say, if an application is installed on one machine, I want it to be installed on the other.
Synchronizing the package lists didn't turn out to be too difficult, at least part of it. I created a shell script that grabs /etc/apt/sources.list from both computers, runs a diff and creates an install command accordingly. It then passes that command back through ssh. It does not, as of yet, uninstall programs. I would need to do something with times or timestamps to implement synchronous uninstallation.
And to synchronize the desktops I successfully implemented unison. Anyone trying to synchronize anything on two or more computers should look this utility up. One nice feature is that it will work across multiple OS's. So I can set it up to sync Users\username\Documents on Vista with /home/username/Documents on Ubuntu if I like.
I ended up tossing both scripts into an hourly cron job on my roommate's web server. It's always on, and always in Linux, neither of which is true for my work and home computers. The next step will be to have each computer ssh the server and invoke the scripts at logon (and maybe at logoff?). That way, I wouldn't have to wait for the hour mark if it was important.
Friday, October 24, 2008
Subscribe to:
Posts (Atom)