Rclone encryption to individual ZIP/7z archives?

Hello,

I'm looking for a solution to backup my files securely to the cloud. I've looked at rclone's encrypt provider, but to decrypt those files would require me to have a computer running rclone - this isn't always convenient.

What I'd like to do is to back up each individual file as an encrypted archive. For example, file.txt is backed up remotely as a password-protected file.zip or file.7z. The folder structure would be copied in its unencrypted form. This would protect the contents of my files while allowing me to access the contents of the file from whichever machine I'm using, so long as I have the password. For my needs, it's the ideal balance of security and convenience. It would also keep incremental updates smaller than using one large ZIP to hold everything.

Is there a way to process a file before it is stored remotely with rclone?

My first thought is that I could write a bash script to pipe the contents of file.txt through 7zip then into rclone rcat to the remote. Are there any better methods of doing this, ideally with the decryption from ZIP/7z in the reverse direction too?

Thanks!

Not currently.

I'm not that familiar with 7zip but in princple that should work. You should be able to reverse the process with rclone cat piping into 7zip.

Hi Nick,

Thanks a lot for taking the time to answer. Much appreciated!

1 Like

Hi Nick,

Just to return to this topic, to use the rcat approach, presumably I would have to run this on each file pending copy. Should I expect this to be much slower and less efficient than a standard rclone copy source_folder destination_folder? Would this approach still allow parallel uploads? I've just uploaded 200GB to B2, which has taken more than 36 hours and counting, so any further loss of efficiency probably wouldn't work.

If I am to develop this approach, is there an Rclone command that will give me a list of all files that need to be copied/synced, so that I can loop through them? Or would I need to write my own logic using file modification dates etc?

Also, I see that the idea of a compressed remote (like the encrypt remote, but zipping individual files instead of encrypting them) has been raised before, in part to take advantage of the file protection that a password-protected archive can provide. Is this likely to be a feature in future?

Thanks again.

I don't know. For lots of small files it may be more efficient, though b2 is pretty low overhead for lots of small files.

Rclone will upload the chunks in parallel so you'll get a certain amount or parallelism. It depends on whether 7zip is running faster than the network or not.

You can use rclone lsf for listing file trees. I don't know how you'd manage syncing though with file dates given the destination is in the 7zip file.

Possibly. I did make an experimental zip archive which worked but had some problems I haven't figured out yet.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.