Skip to content

Instantly share code, notes, and snippets.

@tjdahlke
Last active June 13, 2023 17:56
Show Gist options
  • Save tjdahlke/f41cfa7b85c3bf1002a74ce913eefb4a to your computer and use it in GitHub Desktop.
Save tjdahlke/f41cfa7b85c3bf1002a74ce913eefb4a to your computer and use it in GitHub Desktop.
iphone -> ubuntu photo backup script
# Make sure iphone is unlocked before running this script
# You will need to install the following on your ubuntu machine first:
# sudo apt install libimobiledevice6 libimobiledevice-utils ifuse
#
# Based off of: https://wuzhaojun.wordpress.com/2021/03/19/memo-of-backup-iphones-photos-in-ubuntu-20-04/
cd
# Pair
echo "Pairing iphone"
idevicepair pair
ifuse ~/iphone
echo "Running rsync"
# Copy all new photos
rsync -aP ~/iphone/DCIM/ ~/backup_iphone/DCIM
# Unpair
echo "Unpairing iphone"
idevicepair unpair
fusermount -u ~/iphone
echo "Finished iphone photo backup!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment