Essence_of_War
Platinum Member
I have a backup script that does the following:
1) It creates a new target folder with the current date on an ext4 filesystem.
2) It finds the previous folder (also on the ext4 filesystem) to use as a hardlink reference.
3) It rsyncs from an NTFS source to the target, hardlinking against the reference.
I've noticed that the date modified attribute after the rsync job finishes is ALWAYS wrong. It's not hard to fix this, I can pre-create the folder with mkdir, or touch the folder after rsync creates it, and I've tested both ways and it works fine. I'm just confused as to why when rsync creates the folder, it doesn't seem to get the date modified attribute correctly.
I'm running effectively the same script on two machines, one running ubuntu 14.04, one running 12.04, both have the problem, and I'm using the -avh flags for rsync.
1) It creates a new target folder with the current date on an ext4 filesystem.
2) It finds the previous folder (also on the ext4 filesystem) to use as a hardlink reference.
3) It rsyncs from an NTFS source to the target, hardlinking against the reference.
I've noticed that the date modified attribute after the rsync job finishes is ALWAYS wrong. It's not hard to fix this, I can pre-create the folder with mkdir, or touch the folder after rsync creates it, and I've tested both ways and it works fine. I'm just confused as to why when rsync creates the folder, it doesn't seem to get the date modified attribute correctly.
I'm running effectively the same script on two machines, one running ubuntu 14.04, one running 12.04, both have the problem, and I'm using the -avh flags for rsync.