Crypt file on the fly with dynamic password

What is the problem you are having with rclone?

I would like to encrypt a file from a source remote, using a custom password for that file only, and cat its encrypted content to stdout.

I know I can create a crypt remote overlaying the source remote, which I may be able to dynamically change the password with connection string. But I still have to rclone copy source: crypt: before rclone cat crypt:file. And then I need to rclone delete crypt:file afterward. That involves double storage and extra time

Would be nice to be able to stream the whole thing in one shell pipeline. There may be a way, I just don't know how, and am looking for guideline.

Run the command 'rclone version' and share the full output of the command.

rclone v1.59.0

  • os/version: darwin 13.5.1 (64 bit)
  • os/kernel: 22.6.0 (x86_64)
  • os/type: darwin
  • os/arch: amd64
  • go/version: go1.18.3
  • go/linking: dynamic
  • go/tags: cmount

Which cloud storage system are you using? (eg Google Drive)


The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone copyto source:fileA crypt:fileA
rclone cat crypt:fileA |
rclone deletefile crypt:fileA

The crypt is being done by rclone so there is no way around re-uploading the whole file from a non crypted version so you can't get around that.

You'd have an easier time just uploading directly to the crypt remote.

Understood. Re-uploading the whole file is fine. But I'm hoping for a way for rclone to also send the encrypted data to stdout. Basically, a backend command like crypt's encode/decode.


rclone backend encrypt crypt: encryptedfile1

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