Backing Up Android

download Backing Up Android

If you can't read please download the document

Transcript of Backing Up Android

  1. 1. Backing up Android no root, no fuss, no muss This presentation is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. (C) 2014 [email protected] Jim Salter Technomancer, Mercenary Sysadmin, Small Business Owner Today's slides can be found at: http://openoid.net/presentations/
  2. 2. The low-hanging fruit what's wrong with the cloud?
  3. 3. What's wrong with the cloud? ask Kate Upton... Global exposure Linked accounts Consumer security policies Bandwidth issues (performance) Bandwidth issues (price) Accountability
  4. 4. So, you want local backup easy local backup, amirite? High performance No rooting necessary Easy file browsing Simple restoration Well-understood protocols Hands off automation
  5. 5. What are we backing up? TL;DR: everything on the SD card Camera: Pictures / Videos Documents: Downloads, screenshots, etc Appdata: anything stored in userland NO: system image NO: application binaries NO: system data (written by root process)
  6. 6. Rsync backup for Android Workshop over, go home High performance No rooting necessary Easy file browsing Simple restoration Well-understood protocols Hands off automation
  7. 7. OK, ok, just kidding (it really will be a fairly short workshop though) Llama lets you make your backups automagical, happening when you want, where you want, how you want.
  8. 8. Required equipment think you can come up with all that? You need an Android device. Rooting not necessary. You need a PC / laptop / RasPi / whatever. Linux, BSD, Windows, Mac, whatever. Not required: money, cloud, etc
  9. 9. First things first Spoiler: second things will come second Rsync is going to operate over SSH. So before we do anything else, we want to create an unprivileged system account to run the backups with.
  10. 10. Windows Step 1: create a user account for your backups start->user accounts manage another account create a new account standard user androidbackup create and share a folder: c:usersandroidbackupbackup
  11. 11. Linux (ubuntu): Step 1: create a user account for your backups super->user accounts click unlock icon at upper right click + icon at lower left, standard acct androidbackup
  12. 12. Mac OS X (hopefully): Step 1: create a user account for your backups Open User & Groups preferences click unlock icon at upper right click add icon under list of users androidbackup
  13. 13. Second things second see? foreshadowing works, people Install rsync backup for Android from the Google Play Store. It's free, it's libre, it's good stuff.
  14. 14. Generate a keypair: i'm fresh out of literary devices :( Open rsync backup for Android tap generate keys email the pubkey to yourself when prompted. Super leet mode: use AndSMB to copy it over the LAN instead. /sdcard/dss_key /sdcard/dss_key.pub
  15. 15. Add a backup profile tap add profile and name it You may need to change the source dir On Nexus devices, /sdcard is aliased: /storage/emulated/0 username androidbackup hostname IP or hostname of your PC dropbear SSH key /sdcard/dss_key add: --progress, --delete-after
  16. 16. Add a backup profile
  17. 17. Ayyy, you wan' some sshd? next up: pubkeys Windows users: download/install BitVise SSHd. (Free for personal use.) Linux users: apt-get install openssh-server Mac users: System Preferences Internet & Networking Sharing Remote Login
  18. 18. Knock knock knock knock look ma, no password
  19. 19. Linux and Mac users: look ma, no password sudo -u androidbackup -s mkdir ~/.ssh cp dss_key.pub ~/.ssh/authorized_keys chown -R androidbackup ~/.ssh chmod 700 ~/.ssh chmod 600 ~/.ssh/authorized_keys
  20. 20. Linux and Mac users: look ma, no password sudo -u androidbackup -s mkdir ~/.ssh cp dss_key.pub ~/.ssh/authorized_keys chown -R androidbackup ~/.ssh chmod 700 ~/.ssh chmod 600 ~/.ssh/authorized_keys
  21. 21. Baby's first backup run! wheeeeeeeeeeee
  22. 22. Baby's first backup run! wheeeeeeeeeeee
  23. 23. Llama: it's not WinAMP still awesome though Install Llama from the Google Play Store. It's not libre, but it's free.
  24. 24. Llama: it's not WinAMP still awesome though
  25. 25. What do we want? BACKUP! When do we want it? ONLY UNDER CERTAIN CONDITIONS TL;DR: When it's nighttime, and I'm on my home wifi, and I have 20% or more battery charge... back me up.
  26. 26. Add an event. Set conditions. time, wifi network, battery level
  27. 27. Action: Locale Plugin: rsync This is the part I forget... L for Locale, not R for rsync.
  28. 28. EVERYTHING WORKS! ... right? _( )_/
  29. 29. Questions? Comments? Angry denunciations?