Page 1 of 1

Slightly odd behaviour of mirroring

Posted: Sat Jul 19, 2025 8:44 am
by Wombat
I've noticed something a little strange with the behaviour of mirroring. I setup a profile to copy from right to left all *.ps1 files and selected Exact Mirror. The oddness comes if there is a folder in the target that is also in the source but doesn't contain any .ps1 files. If the folder is empty then it doesn't get deleted. If the folder contains something then it gets deleted. I have 'remove folders that were emptied' selected. Now, if the target folder is empty then Syncovery hasn't emptied it so that behaviour isn't happening, but should the exact mirror option not delete this folder also? Another folder of a name that doesn't exist in the source is deleted empty or not. Is this working as intended? Thank you.

Re: Slightly odd behaviour of mirroring

Posted: Sat Jul 19, 2025 4:09 pm
by tobias
The behavior is correct and works as designed.

For an Exact Mirror, you need to remove the checkmark "remove folders that were emptied".

This checkmark removes folders that Syncovery has just emptied.

It does not remove empty folders in general.

It's really only useful in conjunction with the "Move Files to Destination" mode, not with Exact Miror. When used with the Move Files mode, it allows you to choose if emptied folders on the source side are removed.

Re: Slightly odd behaviour of mirroring

Posted: Sat Jul 19, 2025 5:19 pm
by Wombat
Thank your for your reply, Tobias. If I restore to an empty directory with a filename mask of *.ps1 then it restores exactly what I expect, ie only those directories that contain .ps1 files. If the target directory happens to have a directory that also exists in the source directory but contains no .ps1 files then this directory remains. A directory that doesn't exist in the source directory is correctly deleted. I'd expect that with Exact Mirror enabled that the target would end up with exactly what was copied. If this is really how it's supposed to work then fair enough.

Re: Slightly odd behaviour of mirroring

Posted: Fri Jul 25, 2025 11:25 pm
by tobias
Hello,
the Exact Mirror mode with default settings create an exact mirror of the source side.

By adding a filename mask such as *.ps1, the idea of an exact mirror becomes more complicated, basically it can never be an exact mirror.

For example, you can get a lot of empty directories, which are only empty because of the mask.

To prevent this, you can remove the checkmark "Create Empty Folders" in the "Folders" settings category.

But you should never choose the checkmark "remove folders that were emptied" because that is quite unpredictable and confusing when you use it.

Please do not expect empty folders to be deleted if they are only empty because of your mask.

Empty folders are deleted if they no longer exist on the source side.

Re: Slightly odd behaviour of mirroring

Posted: Sat Jul 26, 2025 11:07 am
by Wombat
Thanks for the detailed reply, Tobias. That clears the confusion up.