A Rust program to backup and restore your Termux home and sysroot directories.
.tar.gz).tar.gz archive for your architecture:
case "$(dpkg --print-architecture)" in
aarch64) TARGET="aarch64-linux-android" ;;
arm) TARGET="armv7-linux-androideabi" ;;
i686) TARGET="i686-linux-android" ;;
x86_64) TARGET="x86_64-linux-android" ;;
esac
VERSION=$(curl -sL https://api.github.com/repos/rc-chuah/termux-backup/releases/latest | grep -Po '"tag_name": "\K[^"]*')
TAR_VERSION="${VERSION#v}"
curl -LO "https://github.com/rc-chuah/termux-backup/releases/download/${VERSION}/termux-backup-${TAR_VERSION}-${TARGET}.tar.gz"
tar -xzf "termux-backup-${TAR_VERSION}-${TARGET}.tar.gz" -C "$PREFIX/bin"
chmod +x "$PREFIX/bin/termux-backup"
rm -f "termux-backup-${TAR_VERSION}-${TARGET}.tar.gz"
Or download it directly from GitHub Releases, extract termux-backup, and move it to $PREFIX/bin/.
termux-backup
cargo install --locked termux-backup
Or install with latest compatible dependency versions:
cargo install termux-backup
Or install using cargo-binstall:
cargo binstall termux-backup
termux-backup
pkg update -y && pkg install git rust -y
git clone https://github.com/rc-chuah/termux-backup
cd termux-backup
cargo build --release
cp target/release/termux-backup $PREFIX/bin/termux-backup && chmod +x $PREFIX/bin/termux-backup
termux-backup
All release .tar.gz archives include SHA256 checksums and GitHub Artifact Attestations.
pkg install gh in Termux):
# Verify .tar.gz archive
gh attestation verify termux-backup-<version>-<target>.tar.gz --repo rc-chuah/termux-backup
# Verify .tar.gz checksum
sha256sum -c termux-backup-<version>-<target>.tar.gz.sha256
.bash_history) intact..sha256 checksum files are stored at /storage/emulated/0/termux/backups.termux-YYYYMMDD-HHMMSS.tar.gz (UTC), while custom names automatically append .tar.gz if .tar.gz or .tgz is omitted.MB/s speed, and ETA..sha256 checksum file if present before modifying the Termux environment.files directory is cleaned before extracting the backup archive in pure Rust.</a>
Licensed under the GNU General Public License v3.0.