Backup your Android phone with Rsync

published Jan 25, 2016 12:05   by admin ( last modified Aug 07, 2017 12:59 )

Update 2017-08-07 Termux is an even better alternative from Android 5.0 (SDK version 21). You need to install rsync, and it's not one-click though, in operation.


Just tap one icon on your phone and have the rsync back up data automatically, no root needed!

1. Install a terminal emulator on your Android phone, Terminal Emulator or Material Terminal. This terminal emulator will only be used for rsync backups

2. Install Kbox3 inside of the terminal emulator.

3. Set the terminal emulator to use the Kbox3 shell as per the instructions in Install Kbox3.

4. Install rsync, dropbear and kbox-login  from the kbox3 web site

5. Generate an SSH private/public key pair on the Android phone in the dropbear format, store it somewhere on the phone

6. Put the public key on the SSH/Rsync server (e.g. a Linux server)

7. Test that you can transfer files over from the terminal emulator on the phone:

rsync -rh -t --progress -e 'ssh -i /path/to/private_key' /sdcard/DCIM username@server

8. Then set that command line as the initial command of the Terminal emulator

9. Set the back button on the phone to close the session, in preferences

10. Now, every time you open the Terminal emulator, an rsync will happen. Press the back button to close the session.