I am using neo backup often i run into storage issues so i am wondering if there is a possibility of backing data with git, root, Termux, Tasker .
Edit: solved some issues
- storage issue was fixed by not enabling unnecessary backup options. It created massive difference for most applications, eg anki was over 1 GB, now its 9 KB.
- Some application’s backups were not working( After restoring applications were crashing), for them, rather than backing up whole data, we can copy relevant data. Eg for element, we can backup by
cp /data/data/im.vector.app/shared_prefs/im.vector.app_preferences.xml %ConfigBackupLocation/element # you need root for this


I don’t have root access on my phone but I still copy backups of my media and apps that export data to accessible files.
I keep my process very simple using Termux with
rsyncopensshandtermux-servicespackages.I created a folder dedicated on my for syncing between phone to computer called
syncbut you can change this for your needs.From a fresh Termux install, the setup should look something like the following:
# Update package list and packages pkg update && pkg upgrade # Install required packages pkg install rsync openssh termux-services # Setup Termux's access to your phone's files termux-setup-storage # Make the required folder mkdir ~/storage/shared/sync/ cd ~/storage/shared/sync/ # Automatically start your SSH server when you open Termux sv-enable sshd~ $ whoami u0_a205passwd(I can’t remember if this step is important)A quick note: Termux on android has a file system quite different than a computer so file and directory names can get quite long. The
pwdcommand would show/data/data/com.termux/files/home/storage/shared/syncfor my sync folder.This can be made simpler by using the
realpathcommand.realpath /data/data/com.termux/files/home/storage/shared/syncthen shows/storage/emulated/0/syncas a result. If you’re using CLI, this may make your commands easier to read.Now you can start to build your
rsynccommand to transfer your files. When setting up anrsynccommand, ALWAYS use the--dry-run-option. This performs a “transfer” without any files being moved.rsync --dry-run --archive --verbose --human-readable --partial --progress --compress -e 'ssh -p 8022' u0_a205@192.168.40.210:/storage/emulated/0/sync/ /home/computer_username/backup/rsync --dry-run --archive --verbose --human-readable --partial --progress --compress /storage/emulated/0/sync/ computer_username@192.168.40.205:/home/computer_username/backup/Explanation:
--archivepreserves several file attributes--verbose --human-readable --partial --progresscreates a readable output to see what is happening--compresscompresses the data during the actual transfer (good for over a network)-e 'ssh -p 8022'SSH on termux runs on port 8022u0_a205@192.168.40.210:/storage/emulated/0/sync/andcomputer_username@192.168.40.205:/home/computer_username/backup/are howrsyncidentifies remote folders. Basic format is <username>@<remote IP address>:/path/to/folder//home/computer_username/backup/and/storage/emulated/0/sync/are the local folders, relative to what machine thersynccommand is being run from.In order to reverse the direction of a command relative to the machine you are running on, simple swap the remote folder and local folder in the command. Example: From only my computer:
# Direction: Phone -> Computer rsync --dry-run --archive --verbose --human-readable --partial --progress --compress -e 'ssh -p 8022' u0_a205@192.168.40.210:/storage/emulated/0/sync/ /home/computer_username/backup/ # Direction: Computer -> Phone rsync --dry-run --archive --verbose --human-readable --partial --progress --compress -e 'ssh -p 8022' /home/computer_username/backup/ u0_a205@192.168.40.210:/storage/emulated/0/sync/In order to actually transfer files, remove the
--dry-runoption from the previous rsync commands. The output in your terminal will show additional information regarding transfer status.Additionally, you can also add the
--deleteoption to thersynccommand, this will “deduplicate” files, meaning the source folder will force the destination folder match, file by file. That means deleting any file in the destination folder that does not match the source folder list of files.A command WITHOUT
--dry-runand WITH--deletewould look like the following (CAUTION: THIS CAN DELETE FILES IF UNTEST):rsync --delete --archive --verbose --human-readable --partial --progress --compress -e 'ssh -p 8022' u0_a205@192.168.40.210:/storage/emulated/0/sync/ /home/computer_username/backup/I personally manually transfer my backups into an encrypted external drive which I manually decrypt. /u/emhl@feddit.org has a suggestion for automated encrypted backups if that’s more to your needs.