Is it possible to copy a Time Machine backup using rsync to another HFS formatted disk. I am concerned that rsync would not be able to track the hard linked directories that Time Machine uses

  • 1
    I haven't tested, but I'm pretty sure it won't recreate the linked directory structure. In Apple's support document HT202380: "Transfer Time Machine backups from one backup disk to another", they recommend using Finder to copy the backup (after making sure the disk is properly formatted, has permissions enabled, and TM is switched off). – Gordon Davisson Dec 5 '19 at 7:32
  • Thank you. I've seen that article, too. Finder is a disaster when you go over several hundred thousand files. – Juan Dec 5 '19 at 16:39
  • In that case I'm not sure what to suggest. I don't think there's a way to break it up into Finder-handlable chunks without (again) breaking the hard-linked directories, and I don't know of any other tools that'll handle them properly. – Gordon Davisson Dec 5 '19 at 18:36
  • @GordonDavisson, if you convert your comments to an answer, I will accept it. – Juan Dec 6 '19 at 18:21
  • 1
    I think I'd rather leave the question open, in hopes that someone else has a more definitive answer (or viable alternative). – Gordon Davisson Dec 9 '19 at 0:21

The rsync command is very powerful and versatile, and it can preserve the Hard Links and other crucial information of the Time Machine backup. As from this post (https://www.cyberciti.biz/faq/linux-unix-apple-osx-bsd-rsync-copy-hard-links/), you could do:

rsync -azH /path/to/source /path/to/dest/

The flags stand for:

-a: archive mode (copy direcotries, preserve permisions, groups and ownerships, modification times..)

-z: compress while transfering to accelerate the copying process

-H: preserve Hard Links (crucial for Time Machine backups)

You could also add -v (for verbose) to visually follow the progress of your backup.

(I don't know if Time Machine uses numeric group and user IDs, in which case you could add the --numeric IDs flag).

BTW, you may also want to update your rsync through Homebrew (v. 3.x.x), since the one that ships with Catalina is 2.9.6.

I would also add an alias to my backup script in my .zshrc file with two purposes: 1. make it easier to run without having to type everyithing again every time I want to backup, 2. make it less prone to destructive human error (such as inverting the path to source and the path to destination).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .