Hi there,
I’ve seen a lot of topics people complaining about MCH creating duplicates when using the auto backup function on their phones. I had this issue as well for ages and is really infuriating. The way MCH handles camera roll backup is ridiculous and drives me crazy: each and every photo of mine backed up into MCH is being duplicated 2-5 times. I can’t tell when and how it happens and I simply don’t care anymore, obviously this problem is not going to be fixed anytime soon. So I decided to take things into my own hands and declutter the backup library.
First, this method works on macOS and Linux and requires some basic terminal knowledge and skills. If you are inexperienced with terminal usage and commands please beware and thread carefully because you may end up losing data. The approach is pretty straightforward and if you watch your steps, you should be completely fine. With the disclaimer out of the way, here we go.
We’ll be using a great piece of software called fdupes.
On MacOS you can get it via HomeBrew
Launch Terminal and copy&paste:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install fdupes
On Debian base systems: sudo apt-get install fdupes
From this point on I am going to describe the process on MacOS because I know Linux folks will find their way.
Right-click on MCH icon on your desktop and select “New Terminal at folder”. Then paste the following command in the terminal window:
fdupes -rdNL50000000 your_camera_roll_backup_folder
What this command will do: fdupes will identify all duplicates with size below 50 mb within your camera roll backup folder recursivly and delete them automatically by preserving only the first file in every duplicate set. The reason to use the -L (max size) option is because fdupes compares files byte by byte and if you have large video files the process is going to take forever and you will die on this hill. MCH speeds are snail slow. However, for videos I have different approach which I will describe at the end.
your_camera_roll_backup_folder should be named something like John’s iPhone 13 Camera Roll Backup. Probably it will have spaces in it so I suggest using the TAB button to get the name right when typing the command. Just type in fdupes -rdNL50000000
, press space, insert the first symbols of the folders name like John and hit TAB.
When fdupes is done with the duplicates in your camera roll folder run:
fdupes -mL50000000 your_camera_roll_backup_folder
The above will re-analyze and display a brief summary if any other dupes are present in the directory.
It took me 10 minutes to kill 5k duplicates within 15k photos.
For the videos. I dealed with the larger files (above 50 mb) within Finder because I don’t have a ton of video footage. Just sort by size and begin to delete manually all dupes. They are easily identified because they have the same name as the original ending _1 _2 _3 and so on. P.e. 4757.MOV (original) and 4757_1.MOV 4757_2.MOV.
Now, I don’t know If this is a permanent solution. I have no dupes for 3 days now but the next firmware update could trigger the multiplication again, who knows. Anyway, you could easily maintain your library by checking for dupes and deleting them on a regular basis. Again, it took me 10 minutes. It’s not perfect but once you get it, its easy peasy.
Once again: BEWARE, deleting files via terminal is final and non reversable. I suggest before doing it to the MCH backup folder to practice. Copy a duplicate set containing the original file and its duplicates, paste it in ~/Downloads, run fdupes and observe the output. Once you are comfortable and satisfied with the result proceed with the real thing.
I hope this helps. My apologies if the instructions are unclear, I really ■■■■ at tutorials. Good luck.