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-backup
Or install using cargo-binstall:cargo install termux-backup
cargo 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:
Or
git clone https://github.com/rc-chuah/termux-backup
git clone https://github.com/RaynerSec/termux-backup
- Change directory:
cd termux-backup - Build the release binary:
cargo build --release
- Run the program:
./target/release/termux-backup
- Optional: Install to PATH
cp target/release/termux-backup $PREFIX/bin/termux-backup chmod +x $PREFIX/bin/termux-backup 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).