On 15/02/13 12:29, mick wrote:
internally all my data from the old disk to the new. In doing so (using something like "cp -r /old-disk/micks-stuff /new-disk/micks-stuff") like a pillock I forgot to add the -p switch so all my files now have a current date/time as last modified. Guess what? My latest rsync now
For that sort of copying I recommend using the '-a' option aka '--archive'. Even better might be to use a streaming tar 'tar -c... | tar -x ...' or similar with cpio or just rsync. Just read the manuals and be careful of the gotchas such as symlinks, sparse files, very long file names, device files, ...
On 15/02/13 19:29, mick wrote:
I may just have to recopy all the source files from disk to disk using the -p switch to cp so that the file time stamps are maintained. That way the NAS won't see all the source files as being newer next time I kick off the rsync.
You just need to fix the timestamps so take a look at 'find' and 'touch'. For 'find' look at the '-exec' option and '{}'. For 'touch' look at '--reference=', ' --no-dereference', and '--no-create' options. The rest is left as an exercise for the reader. :)
Mike.