Update README, moving backup.sh into file instead.
This commit is contained in:
parent
ded2cd3dd8
commit
a98155983a
40
README.md
40
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.
|
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:
|
Install [Termux](https://f-droid.org/en/packages/com.termux/) from F-Droid, open it, and execute the following:
|
||||||
```bash
|
```bash
|
||||||
pkg install git
|
pkg install git
|
||||||
|
@ -22,43 +22,37 @@ git clone https://git.caspervk.net/caspervk/borgbackup_on_android
|
||||||
cd borgbackup_on_android
|
cd borgbackup_on_android
|
||||||
bash build.sh
|
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 messages like
|
||||||
```
|
```
|
||||||
WARNING: linker: /data/data/com.termux/files/usr/lib/libacl.so.1.1.0: unused DT entry: type 0xf arg 0x449
|
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:
|
Tested with:
|
||||||
- termux 0.56
|
- Termux 0.56, 0.66
|
||||||
- borg 1.0.12, 1.1.3
|
- Borg 1.0.12, 1.1.3, 1.2.0a5
|
||||||
|
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
So all in all my Android backup setup looks like:
|
Install [Tasker](https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm) and
|
||||||
- borg, termux and tasker
|
[Termux:Task](https://f-droid.org/packages/com.termux.tasker/) for Termux-Tasker integration.
|
||||||
- termux: Task (https://f-droid.org/packages/com.termux.tasker/) for tasker integration
|
|
||||||
- tsu (using tsudo of the tsu package)
|
Copy backup script to a folder where Termux:Task can find it
|
||||||
- .termux/tasker/backup.sh:
|
|
||||||
```bash
|
```bash
|
||||||
#!/data/data/com.termux/files/usr/bin/bash
|
mkdir ~/.termux/tasker
|
||||||
date
|
cp backup .termux/tasker/backup.sh
|
||||||
tsudo "~/borgbackup_on_android/borg.sh"
|
|
||||||
date
|
|
||||||
read
|
|
||||||
```
|
```
|
||||||
- ~/borgbackup_on_android/borg.sh:
|
|
||||||
|
Create a repository passphrase (and remember to back it up!!)
|
||||||
```bash
|
```bash
|
||||||
#!/data/data/com.termux/files/usr/bin/bash
|
head -c 1024 /dev/urandom | base64 > /data/data/com.termux/files/home/borgbackup_on_android/borg-passphrase
|
||||||
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
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Change `<server>` and `<port>` in `borg.sh` to correct values.
|
||||||
|
|
||||||
|
|
||||||
Dont forget to set ssh configs accordingly!
|
Dont forget to set ssh configs accordingly!
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue