Folder Content is deleted at Folder-Rename (Special Constellation)

Get help for specific problems
Posts: 4
Joined: 11 Dec 2017

DanielT

Hello,

I just found a propably unwanted behaviour in special constellation.

My Constellation:
Sync of project-folder between Server and Local-PC
Videos are not synced from server to save local SSD-Space i.e. *.mp4 are excluded
Videos are contained in a own folder without anything else

Now I restructered my local-Folders and renamed the "Video"-Folder to "new-Video"

Freefileync deleted the, presumably, empty remote-"Video" folder and created and realy empty "new-Video" folder.

I know, with another configuration i.e. excluding the specific Folders and not Video-File,s this would not have happened. Only an empty folder would have been created. Nevertheless, the behaviour seems dangerous.

Actually, now that I know of it, I lost some Raw-files from subfolders at home when my wife changed directory names to her need... I only realized it now Because I needed the lost data right afterwards.

Best regards
Daniel

PS. The data at hand can be restored for the next three month, so nothing happened.
User avatar
Posts: 2288
Joined: 22 Aug 2012

Plerry

Apparently you are running a Mirror-type sync.
Apart from any exclusions, after the FFS sync the content of your right-side base location
will be an exact copy of your left-side base-location.
No data or folder-tree branches pre-existing in the right-side location, but not or no longer
existing in the left-side location will be retained.

If you want to retain such pre-existing right-side data, you should use the Update sync variant
rather than the Mirror-variant.
If you want left-side renamed files and/or folders to be result in renaming the right-side files and folders instead of being deleted and newly copied over left-to right, you should consider using the Two-way sync variant.
That variant uses a database in the left- and right location, which allows to detect renamed or moved files or folders.
Posts: 4
Joined: 11 Dec 2017

DanielT

Hello Plerry,

I am actually using the two way sync from two different PCs. Up to now I had no reason to complain.

The moving worked as it should for other folders; I renamed a bunch with a prefix "rt_". For clarifciation two examples from the logfile.
...
[11:45:03] Info: Moving file
                 "\\SERVER\11-Testing\03_Bending_0_90\Pictures\CR2\_MG_8660.CR2" to
                 "\\SERVER\11-Testing\03_Bending_0_90\rt_Pictures\CR2\_MG_8660.CR2"
...
[11:45:09] Info: Deleting folder "\\SERVER\11-Testing\03_Bending_0_90\Pictures"
...
[11:45:09] Info: Deleting folder "\\SERVER\11-Testing\03_Bending_0_90\Videos"
[11:45:14] Info: Creating folder "\\SERVER\11-Testing\03_Bending_0_90\rt_Videos"
...
The moving of the "Pictures" folder with its contents worked fine. The "Videos" folder was deleted and recreated; same parent, renamed at the same time. However, the local "Videos" was empty because all contents are excluded via the filter:
*.mov
Both "rt_Videos" folders were empty afterwards. The exclude files got deleted with the folder.
Posts: 4
Joined: 11 Dec 2017

DanielT

*push*
No real statement in regard to this behaviour. Bug? Wanted? Deal with it? :D
User avatar
Site Admin
Posts: 7052
Joined: 9 Dec 2007

Zenju

The behavior is not a bug, but a consequence of folder move being handled as multiple individual file moves (for various reasons...). In this particular case, if the .mov files matter, just don't exclude them via filter, no?
Posts: 4
Joined: 11 Dec 2017

DanielT

Thanks for the quick reply! I myself just thought about the issue again after updating. :D

The .mov files are rather big and are not needed locally. Since they are placed in different folders, sometimes with other files, they are excluded this way.

Wouldn't it be sensible to include a check before deleting seemingly empty folders?
Folder appears empty--through filters--but has more than system and hidden files = Warning
Posts: 1
Joined: 7 May 2018

gdledford1069

The behavior is not a bug, but a consequence of folder move being handled as multiple individual file moves (for various reasons...). In this particular case, if the .mov files matter, just don't exclude them via filter, no? Zenju, 18 Jan 2018, 13:22
I'm going to have to disagree with you here. If you have one copy of data that is, arguably, the master copy because it includes all of the data, and then you have a sync client that includes an exclude=*.mp4 directive, then no matter what you do on the client, it can't touch the mp4 files. If the client moves a directory that contains mp4 files on the server but not on the local machine, then the right thing to do on the server is to create the new directory and leave it empty, but also leave the old directory and the excluded mp4 files. It makes absolutely *no sense* that a client is able to delete files it can't even see! That is a recipe for utter disaster waiting to happen.