iOS photo backup issue


JLundell

Recommended Posts

Hi,

I have been using btsync for 9 months or so backing up my photos from my iPhone to my home linux server.  I just did a sync and four of my most recent photos did not appear in the back up though no errors were raised.  When looking at the backup sorted by date I had two gaps in the image numbers, I had

 

IMG_4555.MOV, IMG_4557.JPG and IMG_4561.JPG

But no 4556, 4558, 4559 or 4560. If I sorted by name, the gaps are filled in with older photos.  Does the iPhone reuse filenames after a while and does the btsync then not sync the new version of IMG_4558.JPG since there was an old one?  This is what appears to be happening. The problem now, is I can not trust the backup since I have no ideas what files are getting backed up and which are not.

 

Any suggestions?  Thanks,

 

John

 

Link to comment
Share on other sites

John,

Sync backups only Camera Roll. Not iCloud shared albums, not iCloud backup, not Live photos. 

Yes, iOS reuses filenames after 10,000 photos taken, and uses same name for iCloud restored backup - these won't be backed up by Sync. On the other hand, if you have taken 3 photos in a row IMG_4557, IMG_4558 and IMG_4559, and then deleted one (IMG_4559), and after that took another two, you will end up with IMG_4557, IMG_4558, IMG_4560 and IMG_4561, no IMG_4559. 

 

Link to comment
Share on other sites

Hi Helen,

Thanks for the response.  So here is the issue, I use the btsync backup as my master copy.  I sync and then delete photos from my phone to make room for new photos (I take a lot of photos and videos).  I thought this would be safe since it does not delete files when it next does a sync.  So now assume I have a file IMG_4561 that I back up and later delete from my phone since it is backed up and so will not be deleted from the backup (great) and then take a bunch of pictures and at some point filename IMG_4561 gets reused.  I now do another sync and this file does not get backed up, and here is the important part - I think it is (no indication that anything is wrong) so I now delete the new IMG_4561 from my phone except is was not backed up and so it is not gone forever.  This is a problem.

It sounds like I will need to periodically move my btsync backup to another directory and then merge the new backup with the old backup by checking filenames, sizes and maybe a checksum to determine if two files with the same name are indeed the same and therefore not merge but if these do not all match merge it in using a different filename.  

Is this correct?  Any other suggestions?

Thanks,

John

Link to comment
Share on other sites

Hi,

So this is even stranger.  I believe that btsync has a bug.  I deleted my backup, after copying it, and made a new one.  After 10 minutes it had completed the backup but I was still missing the same file from before.  Doing a search for the file name I expected, showed that file had been backed up but when I looked at it, it was an older file.  I went to my phone, deleted that picture (it was there) and then resynced and when I did, the photo I was expecting showed up!

It seems when the iphone wraps around the number, it makes a new directory so that the same name can occur and be okay in two places on the phone.  When btsync goes to backup the photos, it seems to only look by name (and not directory) and only gets the oldest version of the file on the phone and this is what gets backed up.  This is a bug since the new file is on the phone, but btsync is not backing it up.

In my new backup, I have 2824 files but btsync on my phone says there are 3115 files so it seems that nearly 300 files on my phone are not getting backed up.

To verify the different directory/same name hypothesis, I loaded ifuse on my linux machine where the btsync server is running and mounted the phone and indeed the one of the other files in question, IMG_4558.JPG, existed in two directories, DCIM/104APPLE and DCIM/114APPLE.

I guess I will have to use ifuse and rsync for now to backup my phone since I can not trust btsync (running 2.3.7.451 and the iphone version reports as 2.3.6 in the sync.log file).  Is there a bug reporting system I should log this on?

Thanks,

John

 

Link to comment
Share on other sites

15 hours ago, JLundell said:

periodically move my btsync backup to another directory and then merge the new backup with the old backup

This won't work, because it's not desktop who decides which files to backup and it cannot interfere with some files missing.

It's IOS that does it. And as was mentioned, iOS reuses the same names if you've taken more than 10,000 of them or restored from iCloud <- these won't be backed up. 

In this case: 

15 hours ago, JLundell said:

have a file IMG_4561 that I back up and later delete from my phone since it is backed up and so will not be deleted from the backup (great) and then take a bunch of pictures and at some point filename IMG_4561 gets reused.

it's NOT reused. Please see my post above explaining how deleted files get named.

Sync backups files only from Camera Roll, apart from the ones mentioned above. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.