i have an issue with my Time Machine Backup. To fix the mess i thought about waling recursively over all TimeMachine Backup folders.

Oldest Backup

Recursively go over every Backup folder (Oldest Backup +x Days) and only copy files which don't exist on NEW_TARGET.

But there's a pitfall. The folder names got changed so:


in the Oldest Backup Folder might be renamed to

"insurences new"

on a more recent backup folder but might contain a lot of same files AND NEW files. So i'm looking for a solution which could handle renamed folders in some way.

I hope someone has a clue how to achieve a solution.


  • 2
    Do you intend to modify the Time Machine back-up directly? Do you expect to restore Time Machine functionality on the files after this process? Could you break down the problem and fix the renamed folders separately to the merge? Commented Apr 24, 2014 at 9:58
  • Hi Graham, i could modify the Backup Folders on Time Machine but there are a lot. 200 Folders. I'm willing to modify those folders so that same folders (logical same) are named the same. This might help rsync a lot i guess :) I don't intend to use the disk for backup again, i just want a clean output of all unique files (and if possible folder structure) so to start over with a fresh disk for backups.
    – chrisK
    Commented Apr 24, 2014 at 10:56
  • Which issue do you have with your TM backup? Maybe it's easier to fix this than to manually trying to reconstruct something with rsync, especially because TM works with multiple links to the same (unchanged) file, not with copies.
    – nohillside
    Commented Apr 24, 2014 at 11:15
  • Yeah that's an issue i have in mind how to cope with the symbolic links. The Backup sometimes did not transfer all files/folders. There are Backup Folders which differ from day to day basis. Like "insurences" folder is present the one day but not the other day.
    – chrisK
    Commented Apr 24, 2014 at 11:26
  • 2
    I was more looking at the way TM organizes the backup drive (and uses hard links for files which do not change between backups). Overall I doubt that you get the backup back into a sane state, so getting another disk and starting over might be the less riskier solution.
    – nohillside
    Commented Apr 24, 2014 at 11:44

2 Answers 2


Modifying Time Machine back-ups directly is difficult. Time Machine uses hard links and other tricks to work. So probably best to try and reconstruct the contents on a new drive.

I would divide the problem into parts:

  • Fix the folder names
  • Merge the folder contents


You can automate the renaming of files and folders matching specific patterns. See Rename multiple files by replacing a particular pattern in the filenames using a shell script for a collection of approaches.

You could also use AppleScript or Automator for this task, if you need more involved logic.


rsync is probably a good starting point for extracting the contents from the Time Machine drive:

If rsync does not quite provide enough for your needs, consider unison.

unison is designed to keep folders synchronised, with the merging taking care to ensure the destination contains only the latest files. Unison can be used on local folders.

  • 1
    Thank you so much for your help! Finally i went with: rsync -abviuPEh --stats It did a really great job and was case insensitive. So if a folder was name "CAR" and on the destination it was "Car" rsync merged the folders.
    – chrisK
    Commented Apr 28, 2014 at 21:57
  • Thank you. Please can you mark the answer as accepted: meta.stackexchange.com/questions/5234/… Commented Apr 29, 2014 at 7:07

For me:

rsync -abviuPEh --stats

did the job.

a = archive b = backup (preexisting files will be appended by default with ~) v = verbose i = itemize (displays a summary what rsync did with a file) u = update (skip files that are newer on the dest) P = partial/progress E = extended attributes for HFS+ Mac OS X h = human readable output

You must log in to answer this question.

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