The command-line utility rsync
does what you ask.
Presuming your old data is on location A, and your new data is on B, do the following:
rsync -ahPruvz --hard-links A B
Quoting from rsync manual:
This tells rsync to look for hard-linked files in the source and link together the corresponding files on the destination.
How to obtain rsync
and use it? There are 2 easy alternatives for Windows:
First alternative: use cygwin
. It's a windows software. Install it, add rsync
at the step of selecting packages. Leave everything else defaulted. After you install it, use its shell to type in the command. If you want, you may use the full path, /usr/bin/rsync
instead of just rsync
. If you want to access Windows drives, use paths like "/cygwin/drives" and always try to auto-complete using TAB.
Second alternative: if it's a desktop computer, use a live GNU/Linux distribution. Prepare a live USB image, boot from it, mount the desired disks and invoke rsync. If the live image does not have rsync
, install it. (apt-get install rsync
in Debian and its derivatives.) If you're not yet experienced with the Linux ecosystem, cygwin could be easier.
According to http://superuser.com/questions/624811/copy-files-from-one-drive-to-another-and-keep-hard-link-in-windows, a software caled "Shadow Copy Cloner" can do that.
– Vojtech – 2015-11-09T21:46:09.3331@Vojtech It isn't freeware and seems to be unavailable. But ln.exe suits my needs, on the other hand. However, I would prefer to have an alternative with GUI. – Estus Flask – 2015-11-09T21:59:45.437
1@PJMahoney Yes, these are hard links, there would be no problems with copying junctions and symbolics, the latter could be just copied and fixed later. I don't intend to clone it, just to copy the directory structure (which is a part of the whole disk) to another non-empty disk. – Estus Flask – 2015-11-11T17:55:18.350