Related to this question
Short description of the problem:
When source tree has a mounted point inside it, then time stamps on files inside that mounted point when copied to target tree are not preserved even when using -a
option
Detailed description:
Assume this is the source tree:
/home/ /home/
| |
me/ BACKUP/
| |
+----+----------+ +----+-------+
| | | | | |
data/ foo.txt boo.txt data/ foo.txt boo.txt
| |
a.txt a.txt
where data/
above is mounted external USB disk. Everything is ext4
file system. Everything in source is owned my me
.
BACKUP
also happened to be a mount point, the backup USB disk.
After issuing this command rsync -av --delete /home/me/ /home/BACKUP/
, I found that /home/BACKUP/data/
and everything below it has the current time stamp, as if these files were created now, and not the time stamp on the files in /home/me/data/
. Other files and folders outside data
did have the time stamp preserved OK.
Question is: How to use rsync
in the above setting to tell it to preserve time stamps on all files and folders even on files and folders on a mounted point?
I am using:
>uname -a
Linux 3.5.0-17-generic #28-Ubuntu SMP x86_64 x86_64 x86_64 GNU/Linux
>rsync -v
rsync version 3.0.9 protocol version 30