A Rust program to backup and restore your Termux home and sysroot directories.
- Install using Cargo:
Or install with latest compatible dependency versions:
cargo install --locked termux-backupOr install using cargo-binstall:cargo install termux-backupcargo binstall termux-backup - Run the program:
termux-backup
- Install dependencies in Termux:
pkg update -y && pkg install git rust tar gzip -y - Git clone the repository:
git clone https://github.com/rc-chuah/termux-backup - Change directory:
cd termux-backup - Build the release binary:
cargo build --release - Install to PATH
cp target/release/termux-backup $PREFIX/bin/termux-backup && chmod +x $PREFIX/bin/termux-backup - Run the program:
termux-backup
- Backup only works in a normal Termux session.
- Restore works in both normal and failsafe sessions.
- Backups are stored at
/storage/emulated/0/termux/backups. - The restore process in a normal session will clean the current Termux environment before restoring, keeping only essential core utilities needed for extraction.
- Original bash script by Zongou.
- Rewritten in Rust by RC Chuah-(RaynerSec).