Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sext-scientist

macrumors newbie
Original poster
May 31, 2022
5
22
I got a new Mac, and a new external drive for Time Machine. Everything is backed up with a fresh NEW_DRIVE/Backups.backupdb folder automatically. I then tried to copy my old Time Machine files to a separate directory using finder:

OLD_DRIVE/Backups.backupdb/USER -> NEW_DRIVE/OLD/Backups.backupdb/USER

Unfortunately, finder doesn't preserve any hardlinks that saved space in the original, and instead makes multiple copies of the same files. Thus, causing 280GB of files to grow to 1590GB. This is bad, and I'd like to copy everything in the original space-saving form.

What utility or program can I use to accomplish this? I'm proficient in coding/terminal etc. if that provides any options.
 
I'm proficient in coding/terminal etc. if that provides any options.
Looking at the cp man page on ss64 (might be old one) I found this :
Note that cp copies hard linked files as separate files. If you need to preserve hard links, consider using tar, cpio(1), or pax(1) instead.
Another thing to try might be rsync.
 
Last edited:
I would try using rsync. I'm confident that rsync can copy hard links (there is an option for that purpose, at least in version 3.2.3). (What about Monterey's firmlinks, though?)

However, macOS ships with an old version of rsync (version 2.6.9) and I'd read that it doesn't support copying extended attributes. If that's important, it's pretty easy to install 'brew' (i.e., HomeBrew) and use it to install a newer version of rsync (leaving the original version untouched).

I'd use rsync options: -aHAX to cover everything.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.