9

I have drive A: with 16G Space and plenty of files, due to the Hard-link feature in NTFS, the files together is 15G but only takes 2G of real space.

I like to copy all those files to drive B: which is a 4G USB disk, and formatted as NTFS

A: is a tool set in local disk, B: is USB disk for distribution. So I cannot use a bigger USB disk (for the reason of cost), and B: should have all files that can work on another computer.

I tried: robocopy, rsync of windows, and plenty of other disk-clone, backup solution etc.

None work, all simply give out of space error.

My question: how can I copy the files from A: to B: and keep of the hard-link structure?

Any solution welcome, as long as not reboot to non-windows or something. I am using Windows 7.

Chenmunka
  • 3,228
  • 13
  • 29
  • 38
Eric Yin
  • 369
  • 3
  • 9
  • Same question: http://superuser.com/questions/997190/copy-to-another-ntfs-disk-and-preserve-hard-links – M.M Jun 20 '16 at 14:22

4 Answers4

5

Have you tried ln.exe with "Smart Copy" function --copy?

Smart Copy basically creates a copy of the directory structure from the source location to the destination, but it preserves the inner hardlink structure and inner junction/symbolic link relations of the source, and recreates this inner hardlink structure and inner junction/symbolic link relation at the destination location

Smart Copy is a must if e.g. the whole content of a hard disk, which has lots of hardlinks/junctions/symbolic links, should be copied to another hard disk.

cjchacon
  • 51
  • 3
  • I found a software "Shadow Copy Cloner" can do what I want :) – Eric Yin Aug 30 '13 at 19:22
  • www.goldentroutsoftware.com/scc.html‎ – Eric Yin Aug 30 '13 at 19:24
  • @EricYin Dead link – M.M Jun 20 '16 at 14:19
  • ln.exe crashes consistently for me about 180GB into a copy of a 260GB folder ... any alternatives would be welcome – M.M Jun 20 '16 at 14:20
  • Succeeded with cygwin rsync as described in the other thread – M.M Jun 20 '16 at 23:10
  • @EricYin - Could you share a copy of this dead link SW? – Alex S May 02 '19 at 12:34
  • I just tried this, and I could move files and hardlinks wherever I wanted (i.e. to other folders or other drives; rename the source files, move only the hardlinks to another folder etc.pp.) -- and all hardlinks still kept working. For the copying, I tried both Dopus and Explorer, without difference. I wonder whether this has changed in the meantime, such that the problem in the OP does not exist anymore? – David.P Sep 24 '21 at 22:23
1

Third party copy utilities do exist that can handle hardlinks. Look for mention of 'hard links' and possibly 'reparse points' in their documentation to help you identify if a utility can handle it.

SysAdmin1138
  • 5,379
  • 23
  • 24
0

FastCopy claims to handle hardlinks: https://fastcopy.jp/help/fastcopy_eng.htm#hardlink

David.P
  • 459
  • 2
  • 6
  • 27
0

strarc can do it

strarc64.exe -cjd:src_dir | strarc64.exe -xd:dest_dir

http://www.ltr-data.se/opencode.html/

Badr Elmers
  • 223
  • 2
  • 9