https://github.com/postkevone/backupdistrotermux
This is a guide on how to backup and restore any Termux distro without losing folders and files permissions
https://github.com/postkevone/backupdistrotermux
android andronix backup distro termux
Last synced: 2 months ago
JSON representation
This is a guide on how to backup and restore any Termux distro without losing folders and files permissions
- Host: GitHub
- URL: https://github.com/postkevone/backupdistrotermux
- Owner: postkevone
- Created: 2020-05-09T13:01:38.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-03T10:02:21.000Z (almost 6 years ago)
- Last Synced: 2023-07-14T03:29:49.249Z (almost 3 years ago)
- Topics: android, andronix, backup, distro, termux
- Homepage:
- Size: 8.79 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This is a guide on how to backup and restore any Termux distro without losing folders and files permissions
***
**Youtube Tutorial**
[](https://www.youtube.com/watch?v=3rHYsxcEr7k)
***
**Backup**
* Make sure your distro root folders (es. /dev, /proc) can be read by the owner
* If not, change the permissions of the folders to (400)
* Use the following command to backup your Termux "home" and "usr" folder
(you can change your preferred destination for the backup instead of the sdcard root)
```
cd /data/data/com.termux/files
tar --format=gnu -pzcf /sdcard/termux-backup.tar.gz home usr
```
***
**Restore**
* Make sure to have storage permissions and the latest version of your Termux packages (supposing you have just installed Termux)
```
termux-setup-storage
pkg update && pkg upgrade
```
* Restore the "home" folder with the following commands:
```
cd /data/data/com.termux/files
rm -rf home
tar --same-owner -pzxf /sdcard/termux-backup.tar.gz home
```
* Then restore the "usr" folder as well
```
cd /data/data/com.termux/files
cp ./usr/bin/busybox ./tar
rm -rf usr
unset LD_PRELOAD
./tar -zxf /sdcard/termux-backup.tar.gz usr
exit
```
* You did it! You successfully restored your Termux distro!
***
* Termux official backup instructions (this guide doesn't mantain permissions): https://wiki.termux.com/wiki/Backing_up_Termux