Copy Files from One Drive to Another and Keep Hard-Link in Windows

6

3

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.

Eric Yin

Posted 2013-07-26T21:08:39.593

Reputation: 331

Answers

4

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

Posted 2013-07-26T21:08:39.593

Reputation: 41

@EricYin Dead link – M.M – 2016-06-20T14:19:05.913

ln.exe crashes consistently for me about 180GB into a copy of a 260GB folder ... any alternatives would be welcome – M.M – 2016-06-20T14:20:17.513

Succeeded with cygwin rsync as described in the other thread – M.M – 2016-06-20T23:10:50.697

@EricYin - Could you share a copy of this dead link SW? – Alex S – 2019-05-02T12:34:37.500

I found a software "Shadow Copy Cloner" can do what I want :) – Eric Yin – 2013-08-30T19:22:43.350

www.goldentroutsoftware.com/scc.html‎ – Eric Yin – 2013-08-30T19:24:27.763

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

Posted 2013-07-26T21:08:39.593

Reputation: 5 239

2:( Tried many, none works – Eric Yin – 2013-07-27T08:15:31.377