Automated Backups on Tiger Using rsync
Subject:   rsync to, e.g., Linux server with -E
Date:   2005-07-24 01:04:31
From:   iikka
The rsync with -E (--extended-attributes) does not work directly
with stock rsync included in most Linux distros. This is confirmed
by the rsync man pages for the rsync on Tiger, which state the
-E, --extended-attributes
Apple specific option to copy extended attributes,
resource forks, and ACLs. Requires at least
Mac OS X 10.4 or suitably patched rsync.

So, in order to use rsync to make backup from Mac to Linux, the Linux-side
rsync must be patched to support the -E attribute. Here's how to do that
(all commands given on the Linux machine):

1. Get rsync source code

   curl -O
(This is the version supplied with Mac OS 10.4, the patch may well
work on newer versions, but I haven't tried that.)

2. Get the required patch files from darwinsource:

   curl -O

3. Unpach the rsync source
    tar -zxvf rsync-2.6.3.tar.gz

4. Move to the unpacked directory and apply the patch
    cd rsync-2.6.3 && patch <../EA.diff

5. Configure & compile
    ./configure && make

6. Install (as root to replace the current rsync installation)
make install

All this takes less than 10 min. It requires, that you have root
access to the Linux box, though. I made an alias like the following:
    alias syncme  rsync -vaE --exclude=Trash --exclude=Library/Caches 

The command could also be easily added to a cron job.

Also, please note if rsync is used on Mac OS X from a mounted file
system to another, i.e. neither the source or destination path
contains a colon (as described on the original article), it works
regardless of the mounted filesystem type and location. That is,
backup to Linux would also be possible without the above steps by
mounting the target filesystem by, e.g., SMB or NFS, and following
the advice on the original article. The patch is only required,
when two copies of rsync are involved in the process (i.e. the local
and remote copy), in which case both need to support the -E flag.

1 to 2 of 2
  1. rsync to, e.g., Linux server with -E
    2005-07-29 20:09:26  mrkahuna [View]

  2. rsync to, e.g., Linux server with -E
    2005-07-24 11:29:23  Corvus [View]

    • rsync to, e.g., Linux server with -E
      2005-07-24 12:12:54  Corvus [View]

1 to 2 of 2