Does `ntfs` have the concept of hard links?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












Does what I describe below sound good?



  • I am thinking about using rsync to backup files under a directory of my Lubuntu laptop to an external hard drive.


  • I also plan to use the rsync option --link-dest to specify a previous backup on the drive so that it will create hardlinks in the new backup to unchanged files in the previous backup.


  • After finishing creating the new backup, I would like to rm -r the entire previous backup. Am I right that because unchanged files in the previous backup are hardlinked to the new backup, they are not removed and still can be accessed from the new backup?


If yes, my only concern is that my external hard drive has a file system of ntfs type. Is what I described above applicable to ntfs? Does ntfs also have the concept of hard links?



Thanks.







share|improve this question

























    up vote
    0
    down vote

    favorite












    Does what I describe below sound good?



    • I am thinking about using rsync to backup files under a directory of my Lubuntu laptop to an external hard drive.


    • I also plan to use the rsync option --link-dest to specify a previous backup on the drive so that it will create hardlinks in the new backup to unchanged files in the previous backup.


    • After finishing creating the new backup, I would like to rm -r the entire previous backup. Am I right that because unchanged files in the previous backup are hardlinked to the new backup, they are not removed and still can be accessed from the new backup?


    If yes, my only concern is that my external hard drive has a file system of ntfs type. Is what I described above applicable to ntfs? Does ntfs also have the concept of hard links?



    Thanks.







    share|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      Does what I describe below sound good?



      • I am thinking about using rsync to backup files under a directory of my Lubuntu laptop to an external hard drive.


      • I also plan to use the rsync option --link-dest to specify a previous backup on the drive so that it will create hardlinks in the new backup to unchanged files in the previous backup.


      • After finishing creating the new backup, I would like to rm -r the entire previous backup. Am I right that because unchanged files in the previous backup are hardlinked to the new backup, they are not removed and still can be accessed from the new backup?


      If yes, my only concern is that my external hard drive has a file system of ntfs type. Is what I described above applicable to ntfs? Does ntfs also have the concept of hard links?



      Thanks.







      share|improve this question













      Does what I describe below sound good?



      • I am thinking about using rsync to backup files under a directory of my Lubuntu laptop to an external hard drive.


      • I also plan to use the rsync option --link-dest to specify a previous backup on the drive so that it will create hardlinks in the new backup to unchanged files in the previous backup.


      • After finishing creating the new backup, I would like to rm -r the entire previous backup. Am I right that because unchanged files in the previous backup are hardlinked to the new backup, they are not removed and still can be accessed from the new backup?


      If yes, my only concern is that my external hard drive has a file system of ntfs type. Is what I described above applicable to ntfs? Does ntfs also have the concept of hard links?



      Thanks.









      share|improve this question












      share|improve this question




      share|improve this question








      edited Jun 7 at 18:09
























      asked Jun 7 at 18:03









      Tim

      22.5k61222401




      22.5k61222401




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          Yes, NTFS supports hard links:




          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 \fredshare, the following references
          are permitted as a hard link:




          • C:diraethel.txt linked to C:dirbdirclucy.txt


          • D:dir1tinker.txt to D:dir2dirxbell.txt


          • C:dirybob.bak linked to C:dir2mina.txt

          The following are not:




          • C:dira linked to C:dirb


          • C:diraethel.txt linked to D:dirblucy.txt


          • C:diraethel.txt linked to Z:dirblucy.txt






          share|improve this answer





















          • Thanks. Does my plan of using rsync with --link-dest referring to the previous backup to create a new backup, and then removing the previous backup, work?
            – Tim
            Jun 7 at 18:20











          • I don't believe that you can use --link-dest to a different filesystem; my understanding is that it will only work if you are rsyncing from one location to another on the same filesystem. You can't have a hardlink between two filesystems.
            – DopeGhoti
            Jun 7 at 18:26











          • the external hard drive where I plan to create a new backup also holds previous backup. So not possible to hardlink from previous backup to the new backup?
            – Tim
            Jun 7 at 18:36











          • If you are rsyncing from the backup filesysm to the backup filesystem, it should work presuming that the NTFS driver your Linux box is running understands NTFS hardlinks.
            – DopeGhoti
            Jun 7 at 19:47










          • I plan to use rsync from a directory in ext4 in my laptop to ntfs in external hard drive, with --link-dest referring to an previous backup on the ntfs in the external hard drive.
            – Tim
            Jun 7 at 19:49











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f448483%2fdoes-ntfs-have-the-concept-of-hard-links%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote



          accepted










          Yes, NTFS supports hard links:




          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 \fredshare, the following references
          are permitted as a hard link:




          • C:diraethel.txt linked to C:dirbdirclucy.txt


          • D:dir1tinker.txt to D:dir2dirxbell.txt


          • C:dirybob.bak linked to C:dir2mina.txt

          The following are not:




          • C:dira linked to C:dirb


          • C:diraethel.txt linked to D:dirblucy.txt


          • C:diraethel.txt linked to Z:dirblucy.txt






          share|improve this answer





















          • Thanks. Does my plan of using rsync with --link-dest referring to the previous backup to create a new backup, and then removing the previous backup, work?
            – Tim
            Jun 7 at 18:20











          • I don't believe that you can use --link-dest to a different filesystem; my understanding is that it will only work if you are rsyncing from one location to another on the same filesystem. You can't have a hardlink between two filesystems.
            – DopeGhoti
            Jun 7 at 18:26











          • the external hard drive where I plan to create a new backup also holds previous backup. So not possible to hardlink from previous backup to the new backup?
            – Tim
            Jun 7 at 18:36











          • If you are rsyncing from the backup filesysm to the backup filesystem, it should work presuming that the NTFS driver your Linux box is running understands NTFS hardlinks.
            – DopeGhoti
            Jun 7 at 19:47










          • I plan to use rsync from a directory in ext4 in my laptop to ntfs in external hard drive, with --link-dest referring to an previous backup on the ntfs in the external hard drive.
            – Tim
            Jun 7 at 19:49















          up vote
          1
          down vote



          accepted










          Yes, NTFS supports hard links:




          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 \fredshare, the following references
          are permitted as a hard link:




          • C:diraethel.txt linked to C:dirbdirclucy.txt


          • D:dir1tinker.txt to D:dir2dirxbell.txt


          • C:dirybob.bak linked to C:dir2mina.txt

          The following are not:




          • C:dira linked to C:dirb


          • C:diraethel.txt linked to D:dirblucy.txt


          • C:diraethel.txt linked to Z:dirblucy.txt






          share|improve this answer





















          • Thanks. Does my plan of using rsync with --link-dest referring to the previous backup to create a new backup, and then removing the previous backup, work?
            – Tim
            Jun 7 at 18:20











          • I don't believe that you can use --link-dest to a different filesystem; my understanding is that it will only work if you are rsyncing from one location to another on the same filesystem. You can't have a hardlink between two filesystems.
            – DopeGhoti
            Jun 7 at 18:26











          • the external hard drive where I plan to create a new backup also holds previous backup. So not possible to hardlink from previous backup to the new backup?
            – Tim
            Jun 7 at 18:36











          • If you are rsyncing from the backup filesysm to the backup filesystem, it should work presuming that the NTFS driver your Linux box is running understands NTFS hardlinks.
            – DopeGhoti
            Jun 7 at 19:47










          • I plan to use rsync from a directory in ext4 in my laptop to ntfs in external hard drive, with --link-dest referring to an previous backup on the ntfs in the external hard drive.
            – Tim
            Jun 7 at 19:49













          up vote
          1
          down vote



          accepted







          up vote
          1
          down vote



          accepted






          Yes, NTFS supports hard links:




          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 \fredshare, the following references
          are permitted as a hard link:




          • C:diraethel.txt linked to C:dirbdirclucy.txt


          • D:dir1tinker.txt to D:dir2dirxbell.txt


          • C:dirybob.bak linked to C:dir2mina.txt

          The following are not:




          • C:dira linked to C:dirb


          • C:diraethel.txt linked to D:dirblucy.txt


          • C:diraethel.txt linked to Z:dirblucy.txt






          share|improve this answer













          Yes, NTFS supports hard links:




          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 \fredshare, the following references
          are permitted as a hard link:




          • C:diraethel.txt linked to C:dirbdirclucy.txt


          • D:dir1tinker.txt to D:dir2dirxbell.txt


          • C:dirybob.bak linked to C:dir2mina.txt

          The following are not:




          • C:dira linked to C:dirb


          • C:diraethel.txt linked to D:dirblucy.txt


          • C:diraethel.txt linked to Z:dirblucy.txt







          share|improve this answer













          share|improve this answer



          share|improve this answer











          answered Jun 7 at 18:13









          DopeGhoti

          39.8k54779




          39.8k54779











          • Thanks. Does my plan of using rsync with --link-dest referring to the previous backup to create a new backup, and then removing the previous backup, work?
            – Tim
            Jun 7 at 18:20











          • I don't believe that you can use --link-dest to a different filesystem; my understanding is that it will only work if you are rsyncing from one location to another on the same filesystem. You can't have a hardlink between two filesystems.
            – DopeGhoti
            Jun 7 at 18:26











          • the external hard drive where I plan to create a new backup also holds previous backup. So not possible to hardlink from previous backup to the new backup?
            – Tim
            Jun 7 at 18:36











          • If you are rsyncing from the backup filesysm to the backup filesystem, it should work presuming that the NTFS driver your Linux box is running understands NTFS hardlinks.
            – DopeGhoti
            Jun 7 at 19:47










          • I plan to use rsync from a directory in ext4 in my laptop to ntfs in external hard drive, with --link-dest referring to an previous backup on the ntfs in the external hard drive.
            – Tim
            Jun 7 at 19:49

















          • Thanks. Does my plan of using rsync with --link-dest referring to the previous backup to create a new backup, and then removing the previous backup, work?
            – Tim
            Jun 7 at 18:20











          • I don't believe that you can use --link-dest to a different filesystem; my understanding is that it will only work if you are rsyncing from one location to another on the same filesystem. You can't have a hardlink between two filesystems.
            – DopeGhoti
            Jun 7 at 18:26











          • the external hard drive where I plan to create a new backup also holds previous backup. So not possible to hardlink from previous backup to the new backup?
            – Tim
            Jun 7 at 18:36











          • If you are rsyncing from the backup filesysm to the backup filesystem, it should work presuming that the NTFS driver your Linux box is running understands NTFS hardlinks.
            – DopeGhoti
            Jun 7 at 19:47










          • I plan to use rsync from a directory in ext4 in my laptop to ntfs in external hard drive, with --link-dest referring to an previous backup on the ntfs in the external hard drive.
            – Tim
            Jun 7 at 19:49
















          Thanks. Does my plan of using rsync with --link-dest referring to the previous backup to create a new backup, and then removing the previous backup, work?
          – Tim
          Jun 7 at 18:20





          Thanks. Does my plan of using rsync with --link-dest referring to the previous backup to create a new backup, and then removing the previous backup, work?
          – Tim
          Jun 7 at 18:20













          I don't believe that you can use --link-dest to a different filesystem; my understanding is that it will only work if you are rsyncing from one location to another on the same filesystem. You can't have a hardlink between two filesystems.
          – DopeGhoti
          Jun 7 at 18:26





          I don't believe that you can use --link-dest to a different filesystem; my understanding is that it will only work if you are rsyncing from one location to another on the same filesystem. You can't have a hardlink between two filesystems.
          – DopeGhoti
          Jun 7 at 18:26













          the external hard drive where I plan to create a new backup also holds previous backup. So not possible to hardlink from previous backup to the new backup?
          – Tim
          Jun 7 at 18:36





          the external hard drive where I plan to create a new backup also holds previous backup. So not possible to hardlink from previous backup to the new backup?
          – Tim
          Jun 7 at 18:36













          If you are rsyncing from the backup filesysm to the backup filesystem, it should work presuming that the NTFS driver your Linux box is running understands NTFS hardlinks.
          – DopeGhoti
          Jun 7 at 19:47




          If you are rsyncing from the backup filesysm to the backup filesystem, it should work presuming that the NTFS driver your Linux box is running understands NTFS hardlinks.
          – DopeGhoti
          Jun 7 at 19:47












          I plan to use rsync from a directory in ext4 in my laptop to ntfs in external hard drive, with --link-dest referring to an previous backup on the ntfs in the external hard drive.
          – Tim
          Jun 7 at 19:49





          I plan to use rsync from a directory in ext4 in my laptop to ntfs in external hard drive, with --link-dest referring to an previous backup on the ntfs in the external hard drive.
          – Tim
          Jun 7 at 19:49













           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f448483%2fdoes-ntfs-have-the-concept-of-hard-links%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          Peggy Mitchell

          Palaiologos

          The Forum (Inglewood, California)