Wednesday, November 23, 2005

Syncing files

Ok fellow geeks. With the Dell laptop running Mandriva 2005, I wanted to sync up my firefox profile from my desktop running Mandriva 2006. Sure I could manually mount a drive, copy the files over, select overwrite all, but what is the fun in that? Enter rsync.

It took me a few hours to run through the different websites that came up in Google. But I got it to work quite well. Here's the steps:

  1. Install SSH server on the desktop
    1. Using the package manager, I searched for openssh-server. Installed it. Done
    2. Nothing else needed to be configured here, except I needed to get sshd running. In the Control Center, make sure sshd is running in the services, and starts at boot.
    3. Open ssh on the firewall.
  2. Configure rsync
    1. Modify the following to match in /etc/xinetd.d/rsync:
      disable = no
    2. Use Vi or whatever, and create /etc/rsyncd.conf. Add these lines (visit for info on these):

      motd file = /etc/rsync/rsyncd.motd
      log file = /var/log/rsyncd.log
      pid file = /var/run/
      lock file = /var/run/rsync.lock
      uid = nobody
      gid = nobody
      read only = no
      list = yes
      hosts allow =
      hosts deny = *
      path = /home/jbess/.mozilla/firefox
      comment = Sync up Firefox profile
      auth users = jbess

Everything below the [firefox] describes that module. The reason why I installed SSH server is that is sends the files encrypted, rather than clear text. I would suggest the same if you have firefox store usernames and passwords.

From the laptop, I typed at the konsole:

rsync --verbose --progress --stats --compress --rsh=/usr/bin/ssh --recursive --times --perms --links /home/jbess/.mozilla/

No comments: