I have a mobile phone running LineageOS 16.0. I would like to organize the automatic synchronization of particular directory on mobile phone with some remote directory (e.g. exposed via FTP/SMB/SSH) on the server. Ideally would be to have an option either to make one-way (synchronize only missing files) or two-way (source and target are identical after synchronization) modes.
In particular above can be achieved by using the rsync
utility. I see the following options:
Mobile phone is exposing the folder via e.g. SSH
This would require LineageOS running SSH server. In this case rsync
could be run on the server (periodically or on some event).
- Is SSHD server already installed on LineageOS (Native SSH server on LinageOS)? If not, is it possible to install it from a package?
- Will running in the background
sshd
daemon drain the mobile battery? - How difficult would be to add it to startup (SSHD on LineageOS, Execute Script on Start Up)?
Mobile phone is running rsync
- This requires
rsync
installation to LineageOS. Maybe there is ready-to-use package or will it require the compilation? - I would need an icon (or some other easy way) to execute
rsync
on mobile. How to organize that?
If you see other more handy/easy options, please describe how to setup/organize them.
P.S. Dropbox or any other cloud solutions is not an option (out of scope for this question).
Thanks in advance!