Forum Index \ DriveHQ Customer Support Forum \
Read/Reply : 10190/6
  • expressvistos
  • (4 posts)
I'm trying to set up a One-way syc, but the results are not what I expected.
 
I created a "SyncTestCloud" folder in DriveHQ and a "SyncTestLocal" folder on my local drive, and set up a One-way sync from SyncTestCloud to SyncTestLocal.
 
If I create a file in SyncTestCloud it is created (synchronized) in SyncTestLocal, as expected.
But if I create a file in SyncTestLocal it is not deleted on next synchronization, which is not expected.
 
According to the manual, after a synchronization both folders should have the same content. But the file created in SyncTestLocal is never deleted.
 
I tested the inverse setup (One-way from local do cloud) and got the same result, ie, a file created in the sync destination folder is never deleted.
 
This makes syncing useless as the folders don't end up the same.
 
Could you please help me?

9/4/2023 11:33:24 AM

  • DriveHQ_Support
  • (642 posts)
Subject: Re:One-way syc - file created only on destination folder is not deleted

Cloud-to-local One-way synchronization is designed to back up a cloud folder to a local folder. It is not a typical synchronization case, but more of a backup case.

For example, if you use a backup program to back up a local folder to a cloud folder, and if you create a file in the destination cloud folder, then the backup program is unlikely to delete the file in the cloud. (Unless the file name matches with a local file name, then the cloud file will be overwritten.) In this usage case, a user is not expected to make any manual changes to the contents in the backup destination folder. 

Similarly, if a backup program is to back up a cloud folder to a local folder, then users are not expected to manually make any changes to the contents in the local folder. With this assumption, the backup program is more efficient as it only needs to monitor/detect changes in the cloud (source) folder. Otherwise, it needs to periodically monitor/detect changes in both the cloud and local folder, and then compare the changes, and then determine which changes happened earlier...

DriveHQ has the most efficient and reliable Cloud File Server/WebDAV Drive Mapping service. We recommend users using our cloud storage only and use “Cloud-to-local sync” to back up the cloud data. DriveHQ also supports Cloud-to-cloud backup and local-to-cloud backup, please visit this page about our backup options:

https://www.drivehq.com/help/features/Backup.aspx 


Reply
9/4/2023 4:15:48 PM

  • expressvistos
  • (4 posts)
Subject: Re:One-way syc - file created only on destination folder is not deleted

 Thanks for the explanations, but with all due respect that's not what the DriveHQ manual says about synchronization, especially one-way sync.

 
Synchronization and backups are different things. I can even use them for similar purposes, but they are certainly different. Also, we know that user should not make changes in the wrong places. But users do unexpected things and that's one of the reasons for why we have to have backups, synchronizations, etc.
 
Here's a part of the DriveHQ manual:
 
--------
About One-Way Synchronization
 
It could be quite confusing about one-way synchronization. Different implementations handle it differently. Please make sure you understand it very well, otherwise it could cause files being deleted accidentally.
 
The most important thing to know is: whether one-way or two-way synchronization, when the two folders are (manually) synchronized, the folder contents must be exactly the same.
 
For example a server folder S is configured to sync to a local folder C in a one-way synchronization, assume S and C are already sync-ed, and now think about these cases:
 
(1) If you add a file to S, the file will be sync-ed to C, which is as expected; if you add a file in C, the new file is deleted from folder C when next synchronization happens.
...
 
In short, if you have a one-way synchronization from A to B, then no matter what happens, after it finishes synchronizing, B will become the same as A.
--------
 
As the manual explained, at the end of any kind of synchronization the folders should end with exactly the same content.
 
Item (1) deals exactly with the case I presented, that is, in a one-way synchronization, a file created only in the destination folder must be deleted in the next synchronization in order to keep the destination folder identical to the source folder. But this is not what happens in practice, not even with a manual sync.
 
If I'm synchronizing the folders it's precisely because I want them to be the same!
 
I'd like to explain one of my senarios:
 
We have a folder at DriveHQ with a set of documents that must be sent to certain customers. These documents are updated from time to time and we would like to make sure that each employee has an exact copy of the current documents on their local computer.
 
We keep copies in local folders for internal reasons, but also to ensure continuity of work in case we are temporarily without internet.
 
We do not want these documents to be changed or new documents to be added locally. Of course, we advise our employees not to change the local folder, etc. but we know that this can end up happening. And that's why we keep the local folders synchronized with the official cloud version (one-way sync).
 
This is a case where one-way sync applies very well. If a document needs to be updated or a new document added, we do it in the cloud and all local folders are synced and receive the updates.
 
But the way DriveHQ's one-way sync is working, users can inadvertently add new documents to the local folder and it will never be fixed (deleted) on the next one-way sync. With this situation, wrong (added) documents may end up being sent to customers.
 
The local folder will never be the same as the source folder in the cloud and over time the situation will only get worse. This is just one of the scenarios. I have another situation where config and script files must be synced for local use, etc.
 
What I expect from a one-way sync is exactly what the manual says. But I ended up with two folders with different contents. It would be great if this problem was fixed or, in the worst case, the manual was changed to clarify the situation.
 
I hope you can help me with some configuration, etc. Or perhaps the development team can come up with a solution.
 
Thanks.
 

Reply
9/5/2023 1:07:24 PM

  • DriveHQ_Support
  • (642 posts)
Subject: Re:One-way syc - file created only on destination folder is not deleted

I discussed it with our engineers. They agree that it probably is a new bug introduced when they optimized the sync performance. (One-direction sync tasks are mainly used for data backup, so they did not do regression testing of your scenario carefully). Anyway, we plan to fix it by adding a new option to delete the extra files (manually) added to the sync destination folder. We will try to release a new version in a week.


Reply
9/7/2023 10:18:17 AM

  • expressvistos
  • (4 posts)
Subject: Re:One-way syc - file created only on destination folder is not deleted

 Thank you for discussing the issue with the engineering team. Bugs happen and the important thing is to fix them.

 
The idea of ​​adding an option to decide what to do with files added to the destination folder (delete or keep) gives even more control. If implemented this way, the manual will need updating as well.
 
On the other hand, if the one-way sync behavior was just corrected, to delete files erroneously added to the destination and non-existent in the source folder, it would already be excellent and in accordance with the manual.
 
Anyway, thank you and let's wait for the update.

Reply
9/8/2023 11:26:34 AM

  • DriveHQ_Support
  • (642 posts)
Subject: Re:One-way syc - file created only on destination folder is not deleted

Our engineers have provided a new version.They have not released it to the production site yet. Please download it from:

https://www.drivehq.com/folder/p39750/110545117033.aspx

In this version, they added a new option. Please see the screenshot below. (Click Tools-> Manage Sync Tasks, double click a task to edit it)

After you save the option, you can then try to add a file in the destination (local) folder. It will be automatically deleted in a few seconds. ( Please note the deleted files are kept in the _Sync_Cache_ folder by default. )


Reply
9/11/2023 11:55:44 AM

  • expressvistos
  • (4 posts)
Subject: Re:One-way syc - file created only on destination folder is not deleted

 Thanks for the quick solution. I didn't realize that a version with the correction had already been posted.

 
I did a little test and it seems to work well! I just found a situation, very unusual, in which for some reason the synchronization does not happen as expected. But it is a very unusual case and should not interfere with practical use.
 
Here's what I found.
(one-way synchronization)
 
On Windows 11.
- Go to the destination folder
- Use the context menu to create a new text file (right click->new->text document)
- Just accept the suggested name (press enter or click anywhere else)
 
For some reason, in this situation the file is not noticed and deleted automatically. Being created this way, synchronization only notices the file if it is changed.
Sync will also notice and delete the file in the local folder if any modifications are made to the source folder (any other file created, deleted, modified, etc.).
 
Apart from this very unusual case, the solution seems to solve the problem.
 
Thank you for implementing the solution in such a short time.

 


Reply
9/22/2023 8:33:16 AM

Quickly Reply

Please logon and reply, Not DriveHQ Member?


Leading Cloud Surveillance service

Leading Enterprise Cloud IT Service Since 2003