farhansadik / echominal

This script a simple manager for termux. User can use is in a short way. This script is very helpful for beginners
GNU General Public License v3.0
5 stars 0 forks source link

Restore Termux #16

Closed farhansadik closed 3 years ago

farhansadik commented 3 years ago

Task try to solve it using ranger

Result not worked (dependency required)

farhansadik commented 3 years ago

Restore Actions

  1. Locate file in /sdcard/termux-backup
  2. Unzip file in /sdcard/termux-backup and then remove it [or]
  3. Unzip file in /sdcard/termux-backup and move usr and home to termux
  4. Delete echominal file if the file is located
  5. Then clone it again.
  6. Update everything sources.list, packages etc.
squaredevops commented 3 years ago

I got this output:

/sdcard/termux-backup/app.zip                                                                                                                                            
enter file name : app.zip
Archive:  app.zip
  inflating: F-Droid.apk             fchmod (file attributes) error: Operation not permitted
 (warning) cannot set modif./access times
          Operation not permitted
  inflating: com.termux_113-1.apk    fchmod (file attributes) error: Operation not permitted
 (warning) cannot set modif./access times
          Operation not permitted
Press [Enter] key to continue...

But extraction file was ok.

squaredevops commented 3 years ago

Yes it worked fine! even package are working now!! without installing

farhansadik commented 3 years ago

Solution

Backup

cd /data/data/com.termux/files
tar -cvzf /sdcard/Download/termux.tgz --owner=0 --group=0 home usr 

Restore

cd /data/data/com.termux/files
tar -xvzf /sdcard/Download/termux.tgz

https://www.reddit.com/r/termux/comments/75gu7r/how_to_backup_termux_installation_and_restore_it/do7n2eb/

Official site has different solution

NOTE Ensure that storage permission is granted: termux-setup-storage This could be a issue, in some devices. We need to add this. For safety

https://wiki.termux.com/wiki/Backing_up_Termux