Re: can rsync correct dates?
Dr Beco <rcb@beco.cc> wrote:
> For some reason, my restoration from a backup (using rsync) to
> notebook got me all my files dated 13/08/12, indistinctly.
> Now I need to rsync again from backup to notebook just to correct the dates.
> But I don't want to lose files I changed.
> I can "filter" the files I don't want to update with the command:
> $find . -daystart -mtime -21
> That is, all files modified after 13/08/12. They are not much,
> considering that the backup adds up to 130GB.
The way I'd probably go about this is to tar off the recently changed files
find * -daystart -mtime -2 -type f |
cpio -ovBH ustar >/root/KEEP_THESE.tar
Then run a complete re-rsync using
rsync -avHP {from} {to}
And finally, restore the changed files
cd / && tar xvf /root/KEEP_THESE.tar
Chris
Reply to: