rsync guru's

I am trying to write a backup script that will run each night to mirror some of my directories on another machine (the backup machine).

Basically I have a script that produces the following (it is actually a shell script that gets the source directories from another file).

rsync -acz -e ssh /usr/local backup:/backup/hostname
rsync -acz -e ssh /local backup:/backup/hostname

So I am attempting to rsync /usr/local and /local and clone these as backup:/backup/hostname/usr/local and backup:/backup/hostname/local

The problem is that rsync puts BOTH of these in backup:/backup/hostname/usr/local which is not what I want. Does anyone know how I can tell rsync to use the full path in the destination, rather than the last directory. I do not really want to have to specify the entire dest directory as this will stuff my automagic scripts.

Matt

--
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to