After spending time trying to make rsync work, I decided to use something else. I have a tree of files at /home that I want to backup to a 64G USB stick once a day, using the same tree structure, but only copy over the ones that don't exist in destination ( and preserve timestamps ).
The problem:
Even if a source folder has only one new file (and 400 old ones), my rsync always finds a reason to copy about half of them over to dest.
I experimented with something along the lines of this
find /home/me/a/r/z/ -type f -mmin 400 | xargs -0 -I{} cp '{}' /media/usb-id/$( cut -d / -f 4- {} )
Lots of mistakes, I know. I use "4" with cut because that's where the tree starts in destination (/media/usb-id/r/z/whatever). I think I should be using sed somehow in all of this. Any ideas?
Obvious error:
cut: {}: No such file or directory