Split an encrypted remote into two

What is the problem you are having with rclone?

I am trying to split an encrypted remote into two, based on a filter.

Here is my current structure of the remote:

  • January 2020
    • Paycheck15.pdf
    • Paycheck31.pdf
    • Bills.xslx
  • February 2020
    • Paycheck15.pdf
    • Paycheck29.pdf
    • Bills.xslx
      ...

I would like to split it into remote Income and Expenses, both encrypted.

Income:

  • January 2020
    • Paycheck15.pdf
    • Paycheck31.pdf
  • February 2020
    • Paycheck15.pdf
    • Paycheck29.pdf

Expenses:

  • January 2020
    • Bills.xslx
  • February 2020
    • Bills.xslx

The idea is that any PDF files will go to Income, and .xlsx files go to Expenses, while keeping the folder structure.

I have thought of using rclone move with filtering. However, I'm not sure how to approach it as the file names are encrypted, and I want to just do server-side transfers. The example above is minimal, but my files are big, and I don't think I want to use the down-then-up approach.

What is your rclone version (output from rclone version)

rclone v1.53.0-DEV

Which OS you are using and how many bits (eg Windows 7, 64 bit)

  • os/arch: darwin/amd64

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

Google Drive

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

rclone move Financial: Income: --include '*.pdf' --dry-run

The rclone config contents with secrets removed.

[Financial]
type = drive
team_drive = DR1V31
server_side_across_configs = true
stop_on_upload_limit = true
token = foobar

[crypted]
type = crypt
remote = Financial:
filename_encryption = standard
directory_name_encryption = true
password = foobar
password2 = foobar

[Income]
type = drive
team_drive = DR1V32
server_side_across_configs = true
stop_on_upload_limit = true
token = foobar

A log from the command with the -vv flag

Paste  log here

I would use rclone mount to mount the drive then re-arrange the files using your favourite tool.

You can then split the remote.

The password would remain the same for both though.

Does that involve rclone downloading the files for me to re-arrange, then uploading them back? That is something I would like to avoid.

I guess my question with rclone is that if I move a folder from one place to another in an encrypted remote, is rclone smart enough to know that all it needs to do is to rename the path? I would hope so, because the file ID remains the same, encrypted or not, right? Please correct me if I'm wrong.

I found the answer to my question. rclone indeed just moves the files server-side, as long as the source and target are in the same remote.

Once I have them separated, I can use a server-side move for the raw (encrypted files) to a new remote.

That sounds like a good plan!

Yes rclone mount does renames if possible.

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