O 'ntfs' tem o conceito de hard links?

0

O que eu descrevo abaixo parece bom?

  • Estou pensando em usar rsync para arquivos de backup em um diretório do meu laptop Lubuntu em um disco rígido externo.

  • Eu também pretendo usar a rsync option --link-dest para especificar um backup anterior na unidade para que ele crie hardlinks no novo backup para arquivos inalterados no backup anterior.

  • Depois de terminar de criar o novo backup, gostaria de rm -r do backup anterior inteiro. Estou certo de que, como os arquivos inalterados no backup anterior são vinculados ao novo backup, eles não são removidos e ainda podem ser acessados a partir do novo backup?

Se sim, minha única preocupação é que meu disco rígido externo tenha um sistema de arquivos de ntfs type. O que descrevi acima se aplica a ntfs ? O ntfs também tem o conceito de links físicos?

Obrigado.

    
por Tim 07.06.2018 / 20:03

1 resposta

1

Sim , o NTFS oferece suporte a links físicos :

Hard Links

A hard link is the file system representation of a file by which more than one path references a single file in the same volume. To create a hard link, use the CreateHardLink function. Any changes to that file are instantly visible to applications that access it through the hard links that reference it. However, the directory entry size and attribute information is updated only for the link through which the change was made. Note that the attributes on the file are reflected in every hard link to that file, and changes to that file's attributes propagate to all the hard links. For example if you reset the READONLY attribute on a hard link to delete that particular hard link, and there are multiple hard links to the actual file, then you will need to reset the READONLY bit on the file from one of the remaining hard links to bring the file and all remaining hard links back to the READONLY state.

For example, in a system where C: and D: are local drives and Z: is a network drive mapped to \fred\share, the following references are permitted as a hard link:

  • C:\dira\ethel.txt linked to C:\dirb\dirc\lucy.txt
  • D:\dir1\tinker.txt to D:\dir2\dirx\bell.txt
  • C:\diry\bob.bak linked to C:\dir2\mina.txt

The following are not:

  • C:\dira linked to C:\dirb
  • C:\dira\ethel.txt linked to D:\dirb\lucy.txt
  • C:\dira\ethel.txt linked to Z:\dirb\lucy.txt
    
por 07.06.2018 / 20:13