Edit: See here for an automatic version of the backup portion.
Connecting android to Windows and Mac, pretty easy. On arch linux? Major pain. Here’s what I did, mostly via the help of the arch wiki:
- Rooted my phone. Otherwise you can’t back up major parts of the file system (including text messages and most application data) [EDIT: Actually, you can’t back these up over MTP even once you root your phone. Oops.]
- Installed jmtpfs, a FUSE filesystem for mounting MTP, the new alternative to mount-as-storage on portable devices.
- Enabled ‘user_allow_other’ in /etc/fuse.conf. I’m not sure if I needed to, but I did.
Plugged in the phone, and mounted the filesystem:
jmtpfs /media/android
The biggest pitfall I had was that if the phone’s screen is not unlocked at this point, mysterious failures will pop up later.
Synced the contents of the phone. For reasons I didn’t diagnose (I assume specific to FUSE), this actually fails as root:
rsync -aAXv --progress --fake-super --one-file-system /media/android --delete --delete-excluded "$SYNC_DESTINATION"