check for rename and relocate

Discuss new features and functions
Posts: 1
Joined: 23 Mar 2016

arashm12

I regularly sync my laptop HDD with my external HDD. Now assume I have a folder call it "movies" and surly I have it on my external HDD. if you rename it to "movies2" after sync again FreeFileSync wants to delete all "movies" folder and recopy whole "movies2" on external HDD! Think this folder size is 100GB it will remove 100GB of data("movies" folder) and recopy 100GB of data("movies2" folder)to ext. HDD while it can simply rename this folder on external HDD.

Again assume you have a folder call it "fun" and move "movies" folder to this folder on source(laptop HDD), If you sync, FreeFileSync wants to remove all "movies" folder on external HDD and then copy "movies" folder inside "fun" folder in External HDD while it can simply relocate this folder on external HDD that it consumes no time because move a folder or a file inside a partition consumes no time(or very very short time).

I think this program should have a "rename" and "move" phase before sync("update","create","delete") to avoid useless works (like remove a folder and copy that folder again with another name! rather than rename)
Posts: 23
Joined: 18 Mar 2016

zlhnxqgf

Well it's not impossible to do it at all but it's quite hard to get it working reliably. It seems easy to make the right changes if you 'know" what has changed, while it's not as simple when you have to rely only on the snapshot of the previous file trees.
Some good programs have these feature but most of them won't detect the changes in every case and FFS is one of them (https://freefilesync.org/faq.php#features). Even most 1-way sync (backup) programs will fail and for 2-way sync it's even more difficult to do it right. SyncToy does it quite well but it's abandoned since 2009.

My advice is to make "big" changes (like moving large folders) on both sides manually and let sync the rest.
User avatar
Site Admin
Posts: 7211
Joined: 9 Dec 2007

Zenju

FreeFileSync has no issues detecting moved files and folders, but this requires a database file as a reference. The "two-way" variant already uses one, so you get detection of moved files for free. In mirror mode usually no database is needed, but if you want to detect moved files you can select the aptly named checkbox "Detect moved files" in sync settings and moved files will be detected for all subsequent(!) syncs. For the first sync detection is not possible because there is no reference yet.
Posts: 23
Joined: 18 Mar 2016

zlhnxqgf

FreeFileSync has no issues detecting moved files and folders, but this requires a database file as a reference.Zenju
You are right, I tested that several years ago and it seems to be outdated as everything is moved correctly now. Great job!
User avatar
Site Admin
Posts: 7211
Joined: 9 Dec 2007

Zenju

For future reference I've added information about move detection to the manual:
https://freefilesync.org/manual.php?topic=synchronization-settings
Posts: 1
Joined: 19 Apr 2016

xyzdragon

Thanks for your work!

Just a suggestions: There is a mode where it actually makes a deep comparison, I guess by creating hashes for each file. Wouldn't it be possible to recognize moved files using those hashes, which would work even on the first sync using FreeFileSync, and even without creating a database file?

I mean. Instead of recognizing that a file was moved on one side, FreeFileSync could recognize that on the mirror one file with hash 782ffd would be deleted and another file with the same hash 782ffd would be created and in that case it could just move that file. Even in the case where another file would be created which already exists on the mirror, than it could be faster to just copy that file without ever transferring data e.g. per USB or network.

The only problem would be hash clashes I guess. I don't have an idea for that.