Merge changes from GAhlekzis.
This commit is contained in:
parent
5a77943df0
commit
bc5f5c0e05
10
README.md
10
README.md
|
@ -42,12 +42,12 @@ are due to the Android linker. More details can be found at https://stackoverflo
|
|||
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 (modified so that it takes commands with -c): https://github.com/ravenschade/tsu
|
||||
- tsu (using tsudo of the tsu package)
|
||||
- .termux/tasker/backup.sh:
|
||||
``` bash
|
||||
#!/data/data/com.termux/files/usr/bin/bash
|
||||
date
|
||||
tsu -e -c "~/borgbackup_on_android/borg.sh"
|
||||
tsudo "~/borgbackup_on_android/borg.sh"
|
||||
date
|
||||
read
|
||||
```
|
||||
|
@ -55,11 +55,13 @@ read
|
|||
```bash
|
||||
#!/data/data/com.termux/files/usr/bin/bash
|
||||
t=`date +%d_%m_%Y`
|
||||
export BORG_UNKNOWN_UNENCRYPTED_REPO_ACCESS_IS_OK=yes
|
||||
# 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
|
||||
borg create -C lz4 -p -v --stats --one-file-system backup:/backup/borg/$host::filesystem-$t $dirs
|
||||
```
|
||||
|
||||
Dont forget to set ssh configs accordingly!
|
||||
|
|
6
build.sh
6
build.sh
|
@ -1,6 +1,7 @@
|
|||
#!/data/data/com.termux/files/usr/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
apt -y install make clang openssl-dev perl tsu wget git python python-dev gnupg dirmngr curl autoconf automake sed gettext gzip pkg-config libcrypt-dev
|
||||
apt -y install make clang openssl-dev perl tsu wget git python python-dev gnupg dirmngr curl autoconf automake sed gettext gzip pkg-config libcrypt-dev libzmq-dev
|
||||
|
||||
|
||||
pip install virtualenv
|
||||
|
@ -33,6 +34,7 @@ make install
|
|||
cd ..
|
||||
|
||||
#download and build libattr
|
||||
gpg2 --recv-keys 0542DF34
|
||||
wget https://download.savannah.gnu.org/releases/attr/attr-2.4.47.src.tar.gz
|
||||
wget https://download.savannah.gnu.org/releases/attr/attr-2.4.47.src.tar.gz.sig
|
||||
gpg2 attr-2.4.47.src.tar.gz.sig
|
||||
|
@ -58,7 +60,7 @@ cd ..
|
|||
#download and build libacl
|
||||
wget https://download.savannah.gnu.org/releases/acl/acl-2.2.52.src.tar.gz
|
||||
wget https://download.savannah.gnu.org/releases/acl/acl-2.2.52.src.tar.gz.sig
|
||||
gpg2 --recv-key 0542DF34
|
||||
gpg2 acl-2.2.52.src.tar.gz.sig
|
||||
tar -xf acl-2.2.52.src.tar.gz
|
||||
cd acl-2.2.52
|
||||
#fixing paths to sh
|
||||
|
|
Loading…
Reference in a new issue