#!/data/data/com.termux/files/usr/bin/bash export BORG_RSH=borg_ssh_wrapper source /data/data/com.termux/files/home/borgbackup_on_android/borg-env/bin/activate # Avoid UnicodeError export LANG=en_US.UTF-8 # Ask an external program to supply the repository passphrase: export BORG_PASSCOMMAND="cat /data/data/com.termux/files/home/borgbackup_on_android/borg-passphrase" # Set repository location export BORG_REPO=ssh://borg@:/./auto # Initialize remote repository (doesn't matter if it already is). borg init --encryption=repokey-blake2 borg create \ --filter AME \ --compression lz4 \ --remote-ratelimit 0 \ \ --exclude-caches \ --exclude '/data/data/*/cache' \ --exclude '/data/data/*/code_cache' \ --exclude '/data/data/*/no_backup' \ --exclude '**/TWRP/BACKUPS' \ ::'{hostname}-{utcnow}' \ /system /data /storage