I am using rclone to sync files from large Google Shared Drives to MS OneDrive. After a sync I confirm that file modification times are preserved on the files that have been synced, but all the enclosing directories are dated today.
I've looked at a few other posts to this forum, and see that others have had the same question, but some of the answers seem specific to the cloud storage (or local mount conditions), and I just want to confirm that there is no way to preserve dates on enclosing directories before I proceed with my transfers.
Thanks for your help!
Run the command 'rclone version' and share the full output of the command.
Yes.
Which cloud storage system are you using? (eg Google Drive)
My source is Google Shared Drive.
My destination is MS OneDrive.
The command you were trying to run (eg rclone copy /tmp remote:tmp)
Thanks that is helpful. It looks like the link you included may be indicating that a feature for this behavior may be planned (but sounds nontrivial). I have been given until July of this year to do my transfers. Is there any chance the feature may be ready in this time frame, so if I procrastinate, I may be able to take advantage of the implementation?
It’s simple provenance. The content of these directories is the record of research projects that can have spanned many years, with multiple people involved over that span of time. When looking at a given directory and seeing modification times, I or a colleague would be able to identify the time period on the project when that directory was last accessed. With the directory dates gone, the task will require traversing down to file levels, and/or puzzling out differences using directory names that may or may not have enough information in them.
Ah, I see. I tend to ignore directory modification times as any little thing happening in the directory changes it (for example writing MD5SUM files), but I take your point.
Rclone knows the modification times of directories, it just doesn't attempt to sync them. It is a bit of a minefield for a syncing program, because the act of writing files into directories changes their modification times (or can do depending on the destination backend), so the directory modification times need to be set at the end of the sync and the deepest first to shallowest.
It would be possible to list the directory times on the source and set them using another tool.
That sounds like a timing nightmare for a large sync. The funding for these particular projects is finished, so I'm inclined to just make the contents of the archive safe and be done with it, but it's good to know that it could be done. Thank you for asking about it and explaining the general approach that would be needed.