hardlinking missing files from src to a dest: didn't work way I thought it would.
Pierre Bernhardt
pierre at starcumulus.owl.de
Thu Nov 14 15:36:29 UTC 2019
Am 14.11.19 um 16:25 schrieb Pierre Bernhardt:
> Is this for linke backup reason if the source dir is different
> from the link-dest dir because of different hosts like
>
> rsync -av --dest-link=../a a/ backuphost:b/
>
> where on backuphost a is an older copy and b is the new
> target?
Yea, that's the reason:
Here a simple test on my same account (localhost), but should
work also on different host:
~/o is my source dir on my account (with one more file)
host:tmp/a is the last backup (with missing 3-file)
host:tmp/b is the new backup (without any file for now)
After rsync ~/tmp/b should also have all the files linked
from a which are also not modified on local ~/o/ and
created new files from o to b which are new or modified:
pierre at in94:~$ ls -li o tmp/a tmp/b
o:
insgesamt 8
257419 -rw-r--r-- 1 pierre pierre 4 Nov 14 10:53 1
257420 -rw-r--r-- 1 pierre pierre 6 Nov 14 10:53 2
tmp/a:
insgesamt 8
257315 -rw-r--r-- 1 pierre pierre 4 Nov 14 10:53 1
257316 -rw-r--r-- 1 pierre pierre 6 Nov 14 10:53 2
tmp/b:
insgesamt 0
pierre at in94:~$ echo bluppblupp >o/3
pierre at in94:~$ echo bluppblupp >>o/1
pierre at in94:~$ ls -li o tmp/a tmp/b
o:
insgesamt 12
257419 -rw-r--r-- 1 pierre pierre 15 Nov 14 16:34 1
257420 -rw-r--r-- 1 pierre pierre 6 Nov 14 10:53 2
257421 -rw-r--r-- 1 pierre pierre 11 Nov 14 16:31 3
tmp/a:
insgesamt 8
257315 -rw-r--r-- 1 pierre pierre 4 Nov 14 10:53 1
257316 -rw-r--r-- 1 pierre pierre 6 Nov 14 10:53 2
tmp/b:
insgesamt 0
pierre at in94:~$ rsync -av --link-dest=../a o/ localhost:tmp/b/
pierre at localhost's password:
sending incremental file list
./
1
3
sent 226 bytes received 64 bytes 30.53 bytes/sec
total size is 32 speedup is 0.11
pierre at in94:~$ ls -li o tmp/a tmp/b
o:
insgesamt 12
257419 -rw-r--r-- 1 pierre pierre 15 Nov 14 16:34 1
257420 -rw-r--r-- 1 pierre pierre 6 Nov 14 10:53 2
257421 -rw-r--r-- 1 pierre pierre 11 Nov 14 16:31 3
tmp/a:
insgesamt 8
257315 -rw-r--r-- 1 pierre pierre 4 Nov 14 10:53 1
257316 -rw-r--r-- 2 pierre pierre 6 Nov 14 10:53 2
tmp/b:
insgesamt 12
257422 -rw-r--r-- 1 pierre pierre 15 Nov 14 16:34 1
257316 -rw-r--r-- 2 pierre pierre 6 Nov 14 10:53 2
257423 -rw-r--r-- 1 pierre pierre 11 Nov 14 16:31 3
Thanks for the explaination.
Cheers,
Pierre
More information about the rsync
mailing list