Potential bug when deleting all or last file in folder?

English Support for Syncovery on Windows.
Post Reply
SamMarrocco
Posts: 12
Joined: Tue Jul 14, 2020 5:40 pm

Potential bug when deleting all or last file in folder?

Post by SamMarrocco »

I am using the commandline to perform a backup operation and noticing some peculiar behavior.....the command line being used is:

"c:\program files\syncovery\syncoverycl.exe" /INI="<MyPath>\Syncovery Profiles\JobBackupProfiles_1.ini" /RUNX="Sam_SingleSourceBackup_Profile_1" /P /M /EXCL=".AppleDouble.db;adb;" /LEFT="JobDrive:\SourceFolder" /RIGHT="BackupDrive:\BackupFolder"

Here are examples of the behavior:
------------------------------------------------
TEST 1:
LEFT DRIVE FOLDER
File1
File2
File3

RIGHT DRIVE FOLDER
<empty>

Perform backup operation. This yields...

LEFT DRIVE FOLDER
File1
File2
File3

RIGHT DRIVE FOLDER
File1
File2
File3

This is expected behavior. The files on the Left Folder are duplicated in the Right Folder.

------------------------------------------------
TEST 2:
LEFT DRIVE FOLDER
File1
File2
File3

RIGHT DRIVE FOLDER
File1
File2
File3

-Now delete File 3 from the Left Drive Folder.
-Perform backup operation. This yields...

LEFT DRIVE FOLDER
File1
File2

RIGHT DRIVE FOLDER
File1
File2

This is expected behavior. The deletion from the left drive folder is propagated to the right drive folder.

------------------------------------------------
TEST 3:
LEFT DRIVE FOLDER
File1
File2

RIGHT DRIVE FOLDER
File1
File2

-Delete both (all) files from the Left Drive folder, leaving an empty Left Drive Folder. You should now have:

LEFT DRIVE FOLDER
<Empty>

RIGHT DRIVE FOLDER
File1
File2

Perform the backup operation. This yields:

LEFT DRIVE FOLDER
<Empty>

RIGHT DRIVE FOLDER
File1
File2

This is unexpected behavior. The deletions on the left were not propagated to the Right.
------------------------------------------------

Additional info....

When the unexpected behavior occurs, the STDOUT shows "Nothing to do. deletions disabled."
This doesn't seem to make sense, since the same exact profile/ini/commandline is being performed for all these operations and nothing is being changed.

The inconsistent bahavior seems to follow these rules:
-if a single of multiple files are deleted from the left, but not ALL of the files, then the deletions are propagated to the right.
-if there is only 1 file on the Left and it is deleted, then deletions are not propagated to the right.
-if ALL files on the left are deleted, then deletions are not propagated to the right.

Please advise.

tobias
Posts: 1640
Joined: Tue Mar 31, 2020 7:37 pm

Re: Potential bug when deleting all or last file in folder?

Post by tobias »

Syncovery never deletes all files, for safety reasons.

If all files are to be deleted, either it is a non-real-world test case, or something is going wrong.

You can override this safety feature, please see
https://www.syncovery.com/documentation ... irmations/

SamMarrocco
Posts: 12
Joined: Tue Jul 14, 2020 5:40 pm

Re: Potential bug when deleting all or last file in folder?

Post by SamMarrocco »

Understood.
With due respect, this seems like a very crazy default. I cannot imagine circumstances under which anyone would ask for everything to be synchronized, then want a result of "all files deleted except a random single file". The same applies to deleting a "percentage of the files". This would be totally unpredicable and chaotic.

In a true synchronization or backup, there are many circumstances under which you would want to backup to delete all files in a folders, especially if its purpose is to mirror an original source.

I will try the suggested "override" as you proposed and test for our desired, predictable results.

Thank you for the response.

tobias
Posts: 1640
Joined: Tue Mar 31, 2020 7:37 pm

Re: Potential bug when deleting all or last file in folder?

Post by tobias »

The reason is that if there seem to be no files in the source, it could actually be a listing problem. For example over FTP, it could theoretically happen that an empty listing is wrongly received. Therefore, empty listings are considered to be an error by default and nothing will be deleted from the destination if the source is empty.

adzlaw
Posts: 13
Joined: Wed Aug 19, 2020 8:17 am

Re: Potential bug when deleting all or last file in folder?

Post by adzlaw »

You can use the "Exact Mirror" option.

Post Reply