Esses são meus arquivos de teste:
$ ls -li live/
total 2048
804974 -rwxrwx--- 1 ariel ariel 1048576 Feb 22 00:45 live/file1
804975 -rwxrwx--- 1 ariel ariel 1048576 Feb 22 00:47 live/file2
E um primeiro conjunto de backup:
$ rsync -avix live backups/1/
sending incremental file list
created directory backups/1
cd+++++++++ live/
>f+++++++++ live/file1
>f+++++++++ live/file2
$ ls -il backups/*/live/*
804981 -rwxrwx--- 1 ariel ariel 1048576 Feb 22 00:45 backups/1/live/file1
804982 -rwxrwx--- 1 ariel ariel 1048576 Feb 22 00:47 backups/1/live/file2
Eu renomeio file1
e vejo se o rsync pode identificar o arquivo renomeado com --link-dest -fuzzy --fuzzy
:
$ mv live/file1 live/File1
‘live/file1’ -> ‘live/File1’
$ rsync -avHii --debug=HLINK3,FUZZY2 --link-dest=../1 --fuzzy --fuzzy live backups/2
sending incremental file list
created directory backups/2
fuzzy size/modtime match for ../1/live/file1
fuzzy basis selected for live/File1: ../1/live/file1
cd..t...... live/
>f+++++++++ live/File1
hf live/file2
sent 1,048,997 bytes received 188 bytes 2,098,370.00 bytes/sec
total size is 2,097,152 speedup is 2.00
$ ls -il backups/*/live/*
804981 -rwxrwx--- 1 ariel ariel 1048576 Feb 22 00:45 backups/1/live/file1
804982 -rwxrwx--- 2 ariel ariel 1048576 Feb 22 00:47 backups/1/live/file2
805110 -rwxrwx--- 1 ariel ariel 1048576 Feb 22 00:45 backups/2/live/File1
804982 -rwxrwx--- 2 ariel ariel 1048576 Feb 22 00:47 backups/2/live/file2
Rsync vinculado file2
, de modo que o caminho dado a --link-dest
esteja correto e --fuzzy --fuzzy
correspondesse file1
a File1
, mas ainda foi copiado, não vinculado. Por quê?
Tags rsync