For a kind of NAS/server running Ubuntu with SAMBA to host files for several Windows computers, I would like to encrypt the files on the server. I know I could do this for the partition using ZFS or LUKS.
But I have another challenge: Each night I want to sync all changed files into a cloud drive via rsync. In the cloud and before transfer, I want all files to be encrypted. If the complete partition is encrypted, files will appear unencrypted to rsync. Unfortunately rsync does not support synch together with encryption (due to its hash and date algorithms). Thus it would be best to have an unencrypted partition with encrypted files so that rsync can do its job. Having visible file names is not a problem.
Are there any recommendations for how to solve that? I wonder whether SAMBA could do the encryption/decryption or whether there is a file system supporting this. Or maybe there are alternatives to rsync? Cloud Drive supports FTP, SFTP, FTPS, WebDAV, SMB / CIFS with and without VPN, SCP and rsync.