Skip to content

stonewareslord/borgbackup_on_android

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

borgbackup on android

This project provides build scripts to compile borgbackup (https://github.com/borgbackup/borg) and its dependencies on Android. It uses termux (https://termux.com/) as a lightweight environment.

Yoou don't root permission on your phone to use it. However without root permissions the access to data of other apps or system data is not possible, but you can still access your photos, videos,...

If you have root permission on your device, you can use tsu (https://github.com/cswl/tsu) to conveniently gain root permissions in termux and backup you complete device.

How to use:

Tested with:

  • termux 0.53
  • borg 1.0.12

Tested and working so far is:

  • creation of repositories
  • backup to repositories on the device
  • backup up to remote repositories via ssh

Tested and working on devices:

  • Huawei Nexus6p with stock Android 7.1.2 (angler, aarch64)
  • Samsung Galaxy Note 2 with Lineage 14.1 (n7100, armv7l)

Feedback on tests with other devices and android versions is very welcome.

So all in all my Android backup setup looks like:

#!/data/data/com.termux/files/usr/bin/bash
date
tsu -e -c "~/borgbackup_on_android/borg.sh"
date
read
  • ~/borgbackup_on_android/borg.sh:
#!/data/data/com.termux/files/usr/bin/bash
t=`date +%d_%m_%Y`
export BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=yes
export BORG_RELOCATED_REPO_ACCESS_IS_OK=yes
host=angler
dirs="/ /system /vendor /cache /persist /firmware /storage /data"
export BORG_RSH=borg_ssh_wrapper
source /data/data/com.termux/files/home/borgbackup_on_android/borg-env/bin/activate
borg create -C lz4 -p -v --stats --one-file-system backup:/backup/borg/$host::$t $dirs # 2> ~/borg_backup_${t}.err

About

project to make borgbackup run on Android

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%