upvote
With Termux I have rsync at hand, which can compute checksums, delete files after the transfer, etc. That's why I do my complete backup with Termux. And I sort the images on the phone into dated subfolders before syncing them.

And having tools like exiftool, ffmpeg, and ImageMagick among others available in Termux is wonderful.

reply
Yeah same in fact that's how I discovered Termux. I had an rsync.net account and thought that since rsync and ssh are so ubiquitous it should be simple to set up back-ups from my android phone. Boy was I wrong. The android apps that support rsync were all janky or suspiciously closed. Termux + rsync + Termux API's job scheduler does the trick. I think it's a bit of a drain on my phone battery but I won't complain given I own my photo back-ups from top to bottom (though I rent from rsync.net)
reply
That nextcloud issue is quite weird and people seem to have had better luck with the sync app downloaded from places other than the Play store. I personally would lose any confidence in the app and use a completely separate thing to do the syncing if that happened to me. I actually did use the nextcloud client on pc a while ago and it was kind of fickle in other ways too anyway so I stopped using it.
reply
I really like SeaFile for this kind of thing. It follows the "do one thing and do it well" philosophy. It's just file sync with some basic document editing features (markdown, .doc I think). Super fast and dependable, highly recommend.

https://www.seafile.com/en/home/

reply
Are you sure all this is really necessary? I just use round sync to copy over the camera and whatsapp media folders over ssh/sftp to my SBC. Then once every several months I delete the files from these foldes which exceed a given mtime (using find in termux).
reply
I take it as a personal preference to never delete a copy of a file I care about, until I have taken positive proof that it is copied safely where it belongs.

I have deep trust issues with commands that work on more than one file at a time.

reply
> I execute it from within a Termux window...

If you install Termux widgets, you can directly start the script from your Android launcher's Home screen.

reply
Since this process happens just a couple times per year, I find it reassuring to edit the file on the phone, check its contents, run it first in dry-run (the default), grep the output to my leasure, and only then run it in anger.
reply
The widget would be overkill. My tasks were more frequent - several times weekly. The scripts were a hacked-up first step towards cron automation, and occasionally needed to be re-run. Everything is now in a neat, cron-triggered Home Assistant automation with events instead of questionable 'sleep' lines.
reply
How come you don’t just send the md5s to delete rather than the shell script?
reply
That would definitely work too.

What I like about my process is that there is only one source script (the python one) to keep around.

reply
I guess it's a more flexible design that allows to change the criteria for deletions in the future. You still need to calculate md5s on the phone either way.
reply