Greetings!
Using rclone v1.33 on OS X El Capitan.
I uploaded a few hundred files to my Google Drive account. Then on my local server I moved some of those files to a new folder.
Original:
/Movies/A.mp4
/Movies/B.mp4
/Movies/C.mp4
New:
/Movies/A/A.mp4
/Movies/B/B.mp4
/Movies/C/C.mp4
Running the command: rclone sync Movies/ gdrive:Movies/
causes each file to be removed from Movies folder of gdrive and then re-uploaded to each newly created folder.
Expected behavior would be for rclone to realize that these are the same files and instead of wasting bandwidth to reupload them, it would tell google drive to just move the file.
Can anyone confirm this? Am I doing something wrong? It feels to me like this is not the right behavior.
1 Like
calisro
(Rob)
November 15, 2016, 2:38pm
2
This is normal. This would be the same with any tool like rsync or acd_cli.
Thanks for the answer.
That’s too bad. I wonder if this might make a good feature that differentiates rclone. Considering that it can compare md5s why would it need to do this? I don’t think an answer of “because this is how rsync does it” isn’t actually a great answer.
ncw
(Nick Craig-Wood)
November 16, 2016, 6:39pm
4
Rclone could do this certainly. It is a complex feature though.
If you make an issue at github.com/ncw/rclone we can gauge interest for the feature.
Done!
opened 01:11AM - 17 Nov 16 UTC
closed 08:38PM - 03 Jan 17 UTC
I propose that rclone track files as they move in and out of folders rather than deleting the file and then...
enhancement
hopefully it gains some traction if i knew what “coding” was i’d help
1 Like
hari9
January 1, 2017, 2:38pm
8
I hope this is still being worked on! Being unable to make changes to my folder structures does leave me handicapped.
It is! Thanks to bep
on github, it’s pretty much done from the sounds of things. It looks like it’s going to get into a future release (but not this upcoming one just yet). See https://github.com/ncw/rclone/issues/888
hari9
January 1, 2017, 4:04pm
10
exciting! Can’t wait for it. Is it in the Beta yet?
ncw
(Nick Craig-Wood)
January 3, 2017, 2:01pm
11
Not quite! I’ll merge it in a day or two most likely.
1 Like
hari9
January 3, 2017, 4:53pm
12
Great, after I synced a folder from acd to gdrive I went through the folder renaming a few hundred files, about 2TB in size. I can’t wait to see if a reverse sync would recognize that only the names have changed and nothing else.
This will speedup syncing immensely!
ncw
(Nick Craig-Wood)
January 3, 2017, 8:39pm
13
This is merged now…
Please find a beta with this in here: http://beta.rclone.org/v1.35-07-gf1221b5/ (uploaded in 15-30 mins)
hari9
January 4, 2017, 6:20am
14
I assume this will be included in all future beta updates, right?
ncw
(Nick Craig-Wood)
January 4, 2017, 10:15am
15
Yes that is the way it works, yes.
I’ll post an update in a bit with much better performance - I made a mistake in the patch above…
hari9
January 4, 2017, 10:32am
16
So I had two identical folders on gdrive & acd.
I renamed a few hundred files in the gdrive folder.
I used “rclone sync gdrive:folder acd:folder” to see if it will simply rename the files
It looks like it isn’t working. rclone has transferred over 500GB.
Are there any modifiers that I need to add to the sync function for this to work?
ncw
(Nick Craig-Wood)
January 4, 2017, 10:11pm
17
Unfortunately Amazon Drive and Google Drive don’t have a compatible hash - you should have seen a message in the log about that.
This means that you can’t use --track-renames between them unfortunately
hari9
January 5, 2017, 3:09am
18
What a bummer. So it only works within a given Cloud Storage provider but never between two?
ncw
(Nick Craig-Wood)
January 5, 2017, 1:06pm
19
That is actually rubbish as you can see in this table!: http://rclone.org/overview/#features
So I was wrong and this should work between Amzon Drive and Google Drive…
Here is me testing it and showing that it does work for me at least…
$ mkdir rename-test
$ echo potato > rename-test/file1
$ rclone sync rename-test drive:rename-test
2017/01/05 13:02:02 Google drive root 'rename-test': Waiting for checks to finish
2017/01/05 13:02:02 Google drive root 'rename-test': Waiting for transfers to finish
2017/01/05 13:02:03 Waiting for deletions to finish
2017/01/05 13:02:03
Transferred: 7 Bytes (2 Bytes/s)
Errors: 0
Checks: 0
Transferred: 1
Elapsed time: 3s
$ mv rename-test/file1 rename-test/file2
$ rclone sync rename-test acd:rename-test
2017/01/05 13:02:23 amazon drive root 'rename-test': Waiting for checks to finish
2017/01/05 13:02:23 amazon drive root 'rename-test': Waiting for transfers to finish
2017/01/05 13:02:24 Waiting for deletions to finish
2017/01/05 13:02:24
Transferred: 7 Bytes (2 Bytes/s)
Errors: 0
Checks: 0
Transferred: 1
Elapsed time: 3.3s
$ rclone sync --track-renames -v acd:rename-test drive:rename-test
2017/01/05 13:02:45 rclone: Version "v1.35-DEV" starting with parameters ["rclone" "sync" "--track-renames" "-v" "acd:rename-test" "drive:rename-test"]
2017/01/05 13:02:46 amazon drive root 'rename-test': Modify window not supported
2017/01/05 13:02:46 Google drive root 'rename-test': Reading ""
2017/01/05 13:02:47 Google drive root 'rename-test': Finished reading ""
2017/01/05 13:02:47 Google drive root 'rename-test': Making map for --track-renames
2017/01/05 13:02:47 Google drive root 'rename-test': Finished making map for --track-renames
2017/01/05 13:02:47 amazon drive root 'rename-test': Reading ""
2017/01/05 13:02:47 amazon drive root 'rename-test': Finished reading ""
2017/01/05 13:02:47 Google drive root 'rename-test': Waiting for checks to finish
2017/01/05 13:02:47 Google drive root 'rename-test': Waiting for renames to finish
2017/01/05 13:02:47 file1: Couldn't find file - need to transfer
2017/01/05 13:02:48 file1: Moved (server side)
2017/01/05 13:02:48 file2: Renamed from "file1"
2017/01/05 13:02:48 Google drive root 'rename-test': Waiting for transfers to finish
2017/01/05 13:02:48 Waiting for deletions to finish
2017/01/05 13:02:48
Transferred: 0 Bytes (0 Bytes/s)
Errors: 0
Checks: 2
Transferred: 0
Elapsed time: 2.2s
2017/01/05 13:02:48 Go routines at exit 12
Note the rename in the log and the 2 checks and no transfers.
EnorMOZ
(EnorMoz)
February 1, 2017, 9:53pm
20
Does this work with encrypted dirs ?