Hello, I want to use the link-dest feature. Changed files should not be written again but only linked from existing location. I execute rsync: florian@horus ~/python $ rsync --relative --recursive -vv "/home/florian/Desktop/back" "/home/florian/backupTest/2006-05-07" building file list ... done created directory /home/florian/backupTest/2006-05-07 delta-transmission disabled for local transfer or --whole-file home /home/florian/ /home/florian/Desktop/ /home/florian/Desktop/back/ /home/florian/Desktop/back/file1 total: matches=0 hash_hits=0 false_alarms=0 data=4 sent 193 bytes received 66 bytes 518.00 bytes/sec total size is 4 speedup is 0.02 and now a second time without changing something at file1: florian@horus ~/python $ rsync --relative --recursive -vv --link-dest="/home/florian/backupTest/2006-05-07" "/home/florian/Desktop/back" "/home/florian/backupTest/2006-05-07_1" building file list ... done created directory /home/florian/backupTest/2006-05-07_1 delta-transmission disabled for local transfer or --whole-file home /home/florian/ /home/florian/Desktop/ /home/florian/Desktop/back/ /home/florian/Desktop/back/file1 total: matches=0 hash_hits=0 false_alarms=0 data=4 sent 194 bytes received 67 bytes 522.00 bytes/sec total size is 4 speedup is 0.02 But apparantly now hard link has been created: florian@horus ~/backupTest/2006-05-07/home/florian/Desktop/back $ ll insgesamt 4 -rw-r--r-- 1 florian users 4 7. Mai 13:36 file1 florian@horus ~/backupTest/2006-05-07_1/home/florian/Desktop/back $ ll insgesamt 4 -rw-r--r-- 1 florian users 4 7. Mai 13:37 file1 And when I change one file, the other one stays unchanged. florian@horus ~/backupTest/2006-05-07_1/home/florian/Desktop/back $ cat file1 abc florian@horus ~/backupTest/2006-05-07_1/home/florian/Desktop/back $ echo "123" > file1 florian@horus ~/backupTest/2006-05-07_1/home/florian/Desktop/back $ cat file1 123 florian@horus ~/backupTest/2006-05-07_1/home/florian/Desktop/back $ cat ~/backupTest/2006-05-07/home/florian/Desktop/back/file1 abc What am I doing wrong? Thanks, Florian
On Thu, 2006-05-11 at 22:41 +0200, Florian Lindner wrote:> florian@horus ~/backupTest/2006-05-07/home/florian/Desktop/back $ ll > insgesamt 4 > -rw-r--r-- 1 florian users 4 7. Mai 13:36 file1 > > florian@horus ~/backupTest/2006-05-07_1/home/florian/Desktop/back $ ll > insgesamt 4 > -rw-r--r-- 1 florian users 4 7. Mai 13:37 file1You need to tell rsync to preserve mtimes (--times or -t) for it to notice that the file hasn't changed. Otherwise, rsync copies the file again instead of making a hard link. Matt
On Thu, May 11, 2006 at 10:41:33PM +0200, Florian Lindner wrote:> But apparantly now hard link has been created:[...]> -rw-r--r-- 1 florian users 4 7. Mai 13:36 file1[...]> -rw-r--r-- 1 florian users 4 7. Mai 13:37 file1No, those files aren't linked. Notice the leading "1" in the hard-link column which would be a "2" if they were hard-linked to each other. The reason they are not linked together is that you didn't use --times (-t) in your rsync copy, so they ended up needing different timestamps, and rsync can only hard-link files that have identical attributes. ..wayne..
Possibly Parallel Threads
- (un)mounting takes a long time
- hardlinking missing files from src to a dest: didn't work way I thought it would.
- hardlinking missing files from src to a dest: didn't work way I thought it would.
- second fs quota root crashes
- BIND9_DLZ: TKEY is unacceptable - depending on the name server