Page 1 of 1

Copying EXEs over slow connection

Posted: 2022-07-15, 08:42 UTC
by wanderer
I regularly release new EXEs for an application i'm maintaining and copy them to a shared folder from which users execute it. Sometimes, copying it from within the VPN connection i use is somewhat slow. It may take up to 1 minute to finish copying. If at that time someone tries to execute it, he will get an error and possibly corrupt the EXE (it has happened to me once and i assumed it was due to that).

I would like to request a flag in the copy window, which when copying, it would add a ".tmp" extension at the end of the destination file being copied and when the copy process finishes, it would just rename the copied file from ".extension.tmp" to ".extension". This should check the destination folder to see if both ".extension" and ".extension.tmp" files exist and warn the user about overwriting them.

Re: Copying EXEs over slow connection

Posted: 2022-07-15, 09:16 UTC
by ghisler(Author)
The problem with this approach is that special permissions of the target would be lost. Currently when you overwrite a file, any additional permissions are kept, e.g. when you grant other users to access a file. Newly created files inherit the permissions from the target folder.

Re: Copying EXEs over slow connection

Posted: 2022-07-15, 09:34 UTC
by wanderer
Right. This could be solved if TC could rename original file, copy the new, transfer the permissions from old to new and then delete the old and rename the new. Not complex at all :)

Anyway Christian, if you feel it's doable and worth it, it would be a nice addition. I'm currently doing this procedure manually (without the permissions thing) and i thought it would be nice if it was done automatically.

Thanks anyway.

Re: Copying EXEs over slow connection

Posted: 2022-07-18, 15:19 UTC
by CoolWater
Maybe a little off-topic, but you possibly could try to use WireGuard, which performes really good in all aspects. Way better than OpenVPN:

https://restoreprivacy.com/vpn/wireguard-vs-openvpn

HTH

Re: Copying EXEs over slow connection

Posted: 2022-07-19, 07:22 UTC
by wanderer
CoolWater wrote: 2022-07-18, 15:19 UTC Maybe a little off-topic, but you possibly could try to use WireGuard, which performes really good in all aspects. Way better than OpenVPN:

https://restoreprivacy.com/vpn/wireguard-vs-openvpn

HTH
Well, if i was using openvpn, it might be worth checking-out, but i'm not. Additionally, it's not the VPN that's the problem, it's the speed of the line and the traffic over it.

Re: Copying EXEs over slow connection

Posted: 2022-07-19, 12:04 UTC
by ghisler(Author)
You may consider using the xdelta tool. I'm using this to update our user database over a slow connection:
https://github.com/jmacd/xdelta-gpl/releases/tag/v3.1.0

It works like this:
1. You keep a reference file on both computers.
2. You create an xdelta between the update and the reference file on the source computer
3. You copy the xdelta file to the target computer
4. You create the updated file from the reference file and the xdelta file.

This work exceptionally well for databases where only a few records are added or changed. In my case, the dbf file is 130MByte, and the xdelta between the current database and the reference file from August last year is only 500kBytes. It may not work as well for EXE files, though.

Re: Copying EXEs over slow connection

Posted: 2022-07-19, 12:38 UTC
by wanderer
Thanks Christian, it may prove to be useful (maybe not in the case i'm describing but in other cases).