Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Termux, Termux-api, there is a termux job scheduler thing. Also rsync and openssh on it.

Then you copy the ssh public key from the phone to your "home-server", and setup a job scheduler to run rsync - now you have better than nextcloud syncing of your phones pictures/what-have-you with your home-server.



But what's the battery usage? And handling meshing? why not just use Syncthing?


Battery usage is basically zero, since I schedule it to run during evenings and night-time when it is charging with the termux-scheduler-thingie. Android wakes the script up, when those conditions are met, no battery waste. The script when waken up - it checks if the file left over from last time is older than 1h, if so continues to sync, otherwise exits.

Setup of a ssh connection is similar to https, rsync exchange of rsync is usually "all good" and thats it. Rsync otherwise is a very efficient but not very documented protocol network-bandwidth-usage-wise.

Mesh? Syncthing, tried it, sucked for reasons I cant remember now. Nextcloud - had it for years, mind you I was contributed to nextcloud the android app, fixing many bugs, but still it caused me data loss / picture loss. Which I only found out after implementing the rsync solution and seeing OMG rsync found so many pictures Nextcloud was supposed to keep in sync for the past year but it just bugged over.


Twice now I've had, for reasons I can't explain, a folder on my Mac somehow gets renamed from "backgrounds" to "Backgrounds", and then syncthing complains it can't sync the folder for a day or two because the folder is still "backgrounds" on the other clients(which I usually don't notice until I go back digging through the logs), and then somehow syncthing deletes all of the files in this folder on all of the machines, and then spits out a steady stream of errors complaining it can't sync files because no machines currently online have these missing files that it just murdered.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: