My beautiful bride accidentally created duplicates of every photo in her iPhoto Library; her machine was running Mountain Lion (10.8.x). She was unable to undo the madness and a week went by before I was able to take a look at it. Bragging that our Time Machine backup would be able to bring us back in time, failed; when I had iPhoto launched, I tried to enter Time Machine, but every time I tried this, a new window called “Desktop” would appear and then the Time Machine would be opened based on the Desktop.
This was no good. I then tried to recover her entire iPhoto Library from her backed up Pictures folder, but that too failed over permissions.
Enter Terminal.app and rsync. To get around the strange permissions issue, I synced the iPhoto Library using sudo and rsync:
sudo rsync --archive --stats --human-readable --progress /Volumes/Time\ Machine\ Backups/Backups.backupdb/Tina\'s\ MacBook\ Pro/2014-03-07-081254/Macintosh\ HD/Users/christinaschwie/Pictures ~/
It worked like a champ and she’s happily using her iPhoto Library without duplicates again.