view the rest of the comments
Android
DROID DOES
Welcome to the droidymcdroidface-iest, Lemmyest (Lemmiest), test, bestest, phoniest, pluckiest, snarkiest, and spiciest Android community on Lemmy (Do not respond)! Here you can participate in amazing discussions and events relating to all things Android.
The rules for posting and commenting, besides the rules defined here for lemmy.world, are as follows:
Rules
1. All posts must be relevant to Android devices/operating system.
2. Posts cannot be illegal or NSFW material.
3. No spam, self promotion, or upvote farming. Sources engaging in these behavior will be added to the Blacklist.
4. Non-whitelisted bots will be banned.
5. Engage respectfully: Harassment, flamebaiting, bad faith engagement, or agenda posting will result in your posts being removed. Excessive violations will result in temporary or permanent ban, depending on severity.
6. Memes are not allowed to be posts, but are allowed in the comments.
7. Posts from clickbait sources are heavily discouraged. Please de-clickbait titles if it needs to be submitted.
8. Submission statements of any length composed of your own thoughts inside the post text field are mandatory for any microblog posts, and are optional but recommended for article/image/video posts.
Community Resources:
We are Android girls*,
In our Lemmy.world.
The back is plastic,
It's fantastic.
*Well, not just girls: people of all gender identities are welcomed here.
Our Partner Communities:
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
rsync
openssh
andtermux-services
packages.I created a folder dedicated on my for syncing between phone to computer called
sync
but you can change this for your needs.From a fresh Termux install, the setup should look something like the following:
passwd
(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
pwd
command would show/data/data/com.termux/files/home/storage/shared/sync
for my sync folder.This can be made simpler by using the
realpath
command.realpath /data/data/com.termux/files/home/storage/shared/sync
then shows/storage/emulated/0/sync
as a result. If you're using CLI, this may make your commands easier to read.Now you can start to build your
rsync
command to transfer your files. When setting up anrsync
command, ALWAYS use the--dry-run-
option. This performs a "transfer" without any files being moved.Explanation:
--archive
preserves several file attributes--verbose --human-readable --partial --progress
creates a readable output to see what is happening--compress
compresses 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 howrsync
identifies remote folders. Basic format is @:/path/to/folder//home/computer_username/backup/
and/storage/emulated/0/sync/
are the local folders, relative to what machine thersync
command 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:
In order to actually transfer files, remove the
--dry-run
option from the previous rsync commands. The output in your terminal will show additional information regarding transfer status.Additionally, you can also add the
--delete
option to thersync
command, 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-run
and WITH--delete
would look like the following (CAUTION: THIS CAN DELETE FILES IF UNTEST):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.