From bc5f5c0e0594edbc48a9cbf6b70f9433b7142cc5 Mon Sep 17 00:00:00 2001 From: "Casper V. Kristensen" Date: Fri, 22 Mar 2019 00:15:40 +0100 Subject: [PATCH] Merge changes from GAhlekzis. --- README.md | 10 ++++++---- build.sh | 6 ++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d393466..399db1d 100644 --- a/README.md +++ b/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! diff --git a/build.sh b/build.sh index 2443e65..fe47718 100755 --- a/build.sh +++ b/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