Rclone does not preserve directory dates. Is this intentional?

What is the problem you are having with rclone?

Rclone does not preserve directory dates on upload to Google Drive.

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

rclone v1.61.1

  • os/version: Microsoft Windows 10 Pro 22H2 (64 bit)
  • os/kernel: 10.0.19045.2364 (x86_64)
  • os/type: windows
  • os/arch: amd64
  • go/version: go1.19.4
  • go/linking: static
  • go/tags: cmount

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 copy --metadata \my-folder lv426-gdrive-encrypted:

The rclone config contents with secrets removed.

Paste config here

A log from the command with the -vv flag

Paste  log here

I noticed that rclone does not preserve directory dates. I tried this first on Windows, on wsl, and on Linux. I tried with and without the --metadata data flag, but it made no difference.

If I upload a directory to Google Drive without rclone, the modified date is preserved. All sub directories have their date preserved as well.

If I upload a directory to Google Drive with rclone, the modified date is changed to the upload time. All sub directories have their date changed to the upload time.

Is this intentional? For archival purposes, having directory dates preserved is very important to me.

Thanks.

Yes it is. Rclone treats directories as disposable containers. Some backends (eg s3) don't have directories at all and that is the reason why.

Thanks for the reply.

Would it be possible to add this option with a flag like --preserve-directories or would that require to much work?

Its possible of course, but it would be a lot of work since rclone only syncs files at the moment - directories aren't even represented in the sync flow.

I understand. I will just have to live with it for now.

Thanks for the great piece of software.

What issue is created though because of it? I'm trying to understand what work flow that breaks.

I use cloud storage for archival purposes and being able to sort through directories by date modified is very handy.

With what though?

rclone generally works on files not directories so I was more curious on the tool / use case you were doing which made it part of the work flow.

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