Update README, moving backup.sh into file instead.
This commit is contained in:
parent
ded2cd3dd8
commit
a98155983a
44
README.md
44
README.md
|
@ -14,7 +14,7 @@ If you have root permission on your device, you can use the "sudo" of Termux, [t
|
|||
conveniently gain root permissions in Termux and backup your complete device.
|
||||
|
||||
|
||||
## Installation
|
||||
## Building Borg
|
||||
Install [Termux](https://f-droid.org/en/packages/com.termux/) from F-Droid, open it, and execute the following:
|
||||
```bash
|
||||
pkg install git
|
||||
|
@ -22,43 +22,37 @@ git clone https://git.caspervk.net/caspervk/borgbackup_on_android
|
|||
cd borgbackup_on_android
|
||||
bash build.sh
|
||||
```
|
||||
If virtualenv for Python does not work properly set selinux to permissive (`tsudo /system/bin/setenforce 0`).
|
||||
If virtualenv for Python does not work properly, set selinux to permissive (`tsudo /system/bin/setenforce 0`).
|
||||
|
||||
Warning messages like
|
||||
```
|
||||
WARNING: linker: /data/data/com.termux/files/usr/lib/libacl.so.1.1.0: unused DT entry: type 0xf arg 0x449
|
||||
```
|
||||
are due to the Android linker. More details can be found at https://stackoverflow.com/questions/33206409/unused-dt-entry-type-0x1d-arg.
|
||||
are due to the Android linker. More details can be found [here](https://stackoverflow.com/questions/33206409/unused-dt-entry-type-0x1d-arg).
|
||||
|
||||
Tested with:
|
||||
- termux 0.56
|
||||
- borg 1.0.12, 1.1.3
|
||||
- Termux 0.56, 0.66
|
||||
- Borg 1.0.12, 1.1.3, 1.2.0a5
|
||||
|
||||
|
||||
## Configuration
|
||||
So all in all my Android backup setup looks like:
|
||||
- borg, termux and tasker
|
||||
- termux: Task (https://f-droid.org/packages/com.termux.tasker/) for tasker integration
|
||||
- tsu (using tsudo of the tsu package)
|
||||
- .termux/tasker/backup.sh:
|
||||
``` bash
|
||||
#!/data/data/com.termux/files/usr/bin/bash
|
||||
date
|
||||
tsudo "~/borgbackup_on_android/borg.sh"
|
||||
date
|
||||
read
|
||||
```
|
||||
- ~/borgbackup_on_android/borg.sh:
|
||||
Install [Tasker](https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm) and
|
||||
[Termux:Task](https://f-droid.org/packages/com.termux.tasker/) for Termux-Tasker integration.
|
||||
|
||||
Copy backup script to a folder where Termux:Task can find it
|
||||
```bash
|
||||
#!/data/data/com.termux/files/usr/bin/bash
|
||||
t=`date +%d_%m_%Y`
|
||||
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::filesystem-$t $dirs
|
||||
mkdir ~/.termux/tasker
|
||||
cp backup .termux/tasker/backup.sh
|
||||
```
|
||||
|
||||
Create a repository passphrase (and remember to back it up!!)
|
||||
```bash
|
||||
head -c 1024 /dev/urandom | base64 > /data/data/com.termux/files/home/borgbackup_on_android/borg-passphrase
|
||||
```
|
||||
|
||||
Change `<server>` and `<port>` in `borg.sh` to correct values.
|
||||
|
||||
|
||||
Dont forget to set ssh configs accordingly!
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue