Sage Against The Machine

Rsync Problems

For the life of me, I couldn’t get files to transfer from an XP laptop to a FreeNas samba server.

This was why:

rsync Linux Commands: Remote file copy (Synchronize file trees)

a trailing slash on the source changes this behavior to transfer all files from the directory src/bar on the machine foo into the /data/tmp/. A trailing / on a source name means “copy the contents of this directory”. Without a trailing slash it means “copy the directory”. This difference becomes particularly important when using the –delete option.

I had this:
C:\cygwin\bin\rsync.exe –verbose –progress –stats –recursive –exclude-from=”/cygdrive/c/Documents and Settings/rockyl/My Documents/rsync-exclude.txt” “/cygdrive/c/Documents and Settings/rockyl/My Documents” “/cygdrive/s/personalbackups/rocky/My Documents/”

When I needed this:
C:\cygwin\bin\rsync.exe –verbose  –progress –stats –recursive –exclude-from=”/cygdrive/c/Documents and Settings/rockyl/My Documents/rsync-exclude.txt”  “/cygdrive/c/Documents and Settings/rockyl/My Documents/” “/cygdrive/s/personalbackups/rocky/My Documents/”

Do you see that trailing slash I missed? That caused me to only backup directories and not the files within the directories.