I have an android device that has no free space and no sd-card that I can replace (thanks to oneplus policy). I also have no free space on PC to accomodate the backup so I wanted to upload it to the cloud. I have ssh and root access to the device. I also have a remote ftp server space (that I not trust, tough).
I would like to make a password protected tar or zip file and upload it there. I'm not sure if a zip of
/ is sufficient for backup purposes.
The problem is there is no free space left on the device so I need to create the zip file on the fly and "stream" it to the backup server (it's sftp on port 30).
I checked that the ssh, rsync and zip commands are available but I'm not sure how to do a full backup, encrypted zip compression and sftp upload without writing to the disk.
How can I combine commands to do that while connected to the device over ssh?