logoalt Hacker News

m463today at 4:28 AM1 replyview on HN

I backup my iphones to linux using libimobiledevice

the commands I use are:

see if phone is connected:

  lsusb
1) backup entire* device to filesystem:

  idevicebackup2 backup <backup-dir>
2) backup photos/other data:

  ifuse mount -o allow_other /mnt
  rsync -av /mnt <out-dir>
command 1 will create an entire backup of the device, but in a wierd apple format. It can be restored to a clean device though.

command 2 will create a directory containing most of the phone data in an understanable format. for example photos will be in <out-dir>/DCIM, for example DCIM/100APPLE/IMG_0170.HEIC

*: what apple allows you to back up. for example, if you have the kindle app on your phone, neither the app itself, or the kindle books will be backed up. If you restore the backup, you will have to re-download the kindle app, and re-download the book files.


Replies

theKtoday at 5:46 AM

How much user interaction is needed in the phone to make this happen nowadays? I havent used libimobiledevice in ages but I can remember that nm the past in order to get everything your phone would need to request an icloud backup (as most data lived there and not on the device back then) and often the process would just stall if the phone fell asleep.

The lack of selfhosting support on iPhones is the main reason why I'm on android.

show 1 reply