I have a problem using rsync and find together.
I want to use find to create a file list for rsync to use with the --files-from option. I need to do this because the files can be moved from the target directory at a later date, but may remain in the source directory. I can't get find to generate the right paths for rsync.
Here's a fragment of my bash script:
Quote:
RSYNC="/usr/bin/rsync --archive --size-only --verbose"
find ${SOURCE} -mtime -7 > /tmp/rsync_files
${RSYNC} --files-from=/tmp/rsync_files / ${TARGET}
|
This recreates the full path under TARGET.
If I do this:
Quote:
${RSYNC} --files-from=/tmp/rysnc_files ${SOURCE} ${TARGET}
|
This can't find the source files.
I need find to return the partial paths starting at the SOURCE directory, but can't see an easy way to do this.