incorrect file comparison over VPN

Get help for specific problems
Posts: 4
Joined: 17 Mar 2020

kompre

Hi,

I've noticed an odd behaviour now that I'm using FFS over VPN: occasionally the comparison between folders results in the whole folder on my local machine for being copied over the remote location, as if the remote folder would be empty.

Of course that is not the case, and I simply need to run again the comparison to fix this issue.

I think this odd behaviour could be caused by the remote location being not properly accessible at the time of the comparison run, indeed this happened to me again this morning after I just connected to the VPN (usually after connecting to the VPN, it takes a few seconds for me to be able to access the remote location, a samba share, using windows explorer)

I think this could be problematic if not caught in time, because I could potentially start a synchronization of big volume of data (folders are usually few GB in size) and overwrite files that don't have to (it's a two way sync, so there are file on the remote folder that could be more current and need to be copied instead on my local machine)

Hoped to be helpful,
Cheers
User avatar
Site Admin
Posts: 7058
Joined: 9 Dec 2007

Zenju

FFS is checking and reporting errors. If the VPN solution doesn't report any, there is not much FFS can do about.
Posts: 4
Joined: 17 Mar 2020

kompre

I've done some more testing on this issue.

I completely shut down the VPN and be sure that the remote location is not accessible, then I run a comparison check: FFS returns that the whole directories on the local destination should be copied on the remote one. The comparison's result take almost no time at all to be presented (when usually the process take a while) because, of course, the remote destination could not be reached.

Then, when I try to run the synchronization, finally an error message pops up saying the path could not be found and fail the process:
Cannot read file attributes of "\\fileserver\myshare".
ERROR_BAD_NETPATH: The network path was not found. [GetFileAttributes]
Checking the log I also get this message, which is not flagged as error or warning (it has the "i" symbol next to it):
Cannot determine free disk space for "\\fileserver\myshare\directory to sync".
ERROR_BAD_NETPATH: Impossibile trovare il percorso di rete. [GetDiskFreeSpaceEx]
I think this is my problem, the ERROR_BAD_NETPATH does not pop up at the comparison check and get interpreted as if the whole folder is missing and need to be copied over. If I loose connection during the comparison but regain at sync, it could be a mess.

Shouldn't an error raised at comparison if fails to resolve the path?
User avatar
Site Admin
Posts: 7058
Joined: 9 Dec 2007

Zenju

The folder existence checks before comparison and synchronization are the same. If the comparison phase returns no folders, but also no errors, then this is a critical bug that should be addressed by your VPN provider.
Posts: 4
Joined: 17 Mar 2020

kompre

I'm sorry I was wrong: I found out how to access the log for the comparison check and indeed it raises an error when there is no connection (same ERROR_BAD_PATHNET as for the sync run), but the alert window wasn't popping up because I ticked the ignore errors option when I set up the job.

I misunderstood how the ignore errors option works: I thought that, if errors would arise, it would simply fail to sync, i.e. do nothing and close the process without requiring prompt from the user; I now understand that it would try to sync anyway, and since it couldn't compare the folders, it assumes the the whole folder need to be copied over.

So the problem wasn't the VPN after all, but, as usual, the user's shenanigans :-)

By the way the aforementioned supposed behavior, i.e. if errors do nothing, was OK for me because I set up a batch job to run periodically, so if for whatever reason one run would fails, the sync would likely happen at the next try.

So what would be the correct setup to achieve such result? Maybe I need to select "cancel" when I save it as a batch job?

My understanding is that with "cancel" it will abort the job at the first error, so for example if a job has multiple destination (i.e. multiple rows in FFS) and an error occur when checking the first destination, the process will also abort for the others destination without even testing.
User avatar
Site Admin
Posts: 7058
Joined: 9 Dec 2007

Zenju

I misunderstood how the ignore errors option works: I thought that, if errors would arise, it would simply fail to sync, i.e. do nothing and close the process without requiring prompt from the user; kompre, 02 Apr 2020, 13:43
That's correct.

I now understand that it would try to sync anyway, and since it couldn't compare the folders, it assumes the the whole folder need to be copied over. kompre, 02 Apr 2020, 13:43
No it wouldn't: You'd see an error that the source folder was missing when starting synchronization, or conversely either a "folder already existing" error (if network reapeared) or "network path not found" (if it didn't).
Posts: 4
Joined: 17 Mar 2020

kompre

Then I'm pretty much confused...

OK, I've done some more testing: after a failed comparison, it just seems like FFS want to copy the whole content to the remote location, but if I try to sync and in the meantime the path has become available again, the sync will not go trough because the folder was not available during the comparison check.

I've got confused because after a comparison check that fails to reach the remote location, all the files of the local folder are listed in the main pane with the arrow pointing towards the remote location, and so in the overview pane is indicated the cumulative size of all of them.

In the end the problem was with me doing a manual synchronization and getting scared by the alleged size of the sync indicated the overview pane, when in reality the the batch jobs scheduled in the background are doing just fine...

Thanks for helping me out! I've made so much fuss and was not even an issue...