Last active
June 13, 2023 17:56
-
-
Save tjdahlke/f41cfa7b85c3bf1002a74ce913eefb4a to your computer and use it in GitHub Desktop.
iphone -> ubuntu photo backup script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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