XCOPY very slow to start when connected to VPN

Josh K 81 Reputation points
2021-02-05T19:01:56.207+00:00

Laptop is Win 10. I have a .cmd script that uses XCOPY to back my files up. Backup is from my local drive to a USB flash drive. Backup runs just fine unless I'm connected to my work network via VPN, in which case it can take as long as 30 minutes for the script to begin copying files once executed. I've tried unmapping network drives and that did not change anything. I'm only backing up local files, so I don't know what the VPN connection could have to do with anything. Any thoughts or suggestions are appreciated.

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,644 questions
Windows 10 Network
Windows 10 Network
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Network: A group of devices that communicate either wirelessly or via a physical connection.
2,272 questions
0 comments No comments
{count} votes

Accepted answer
  1. MotoX80 31,581 Reputation points
    2021-02-08T18:10:24.86+00:00

    If you have tons of files in Documents, then yes it may take some time to build the directory list.

    Since you are using /d, are you just trying to mirror Documents to a backup folder? If so, try robocopy.exe with the /e switch. Or use /mir (mirror) if you want it to delete files too. The /l switch will run an analysis without doing any copy/deleete.

    Robocopy will also give you a more detailed report of what it did.

    1 person found this answer helpful.

7 additional answers

Sort by: Newest
  1. Josh K 81 Reputation points
    2021-02-08T17:42:11.82+00:00

    I know, it doesn't make any sense to me either. Copying a single file happens right away. The first copy action is to copy the entire Documents folder. For all my commands I use the following switches: /d /i /s /y. If I change the order in which files and folders are copied it seems to start more quickly; could the issue be related to the size of the Documents folder? In doing a trace I did see attempts to connect to a network server even though no network files were being copied; using our company's internal tools I attempted to identify that server but was unable to. It's definitely internal, though, so I'm not compromised.

    0 comments No comments

  2. Josh K 81 Reputation points
    2021-02-08T15:14:52.047+00:00

    HI, Sunny:

    The VPN client is Cisco AnyConnect. Since this is a company laptop I do not have the option to try a different client. I will post this issue in the forum you suggested and mark your reply as an accepted answer so we can close the issue here. Thanks very much!


  3. Sunny Qi 10,901 Reputation points Microsoft Vendor
    2021-02-08T05:05:57.887+00:00

    Hi,

    Thanks for posting in Q&A platform.

    May I know whether the VPN client is a Windows built-in VPN client or a third party VPN client?

    And please kindly not that for issue related script xcopy, I would suggest you could post in the following forum for getting help from script experts.

    https://learn.microsoft.com/en-us/answers/topics/windows-server-powershell.html

    Best Regards,
    Sunny

    ----------

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  4. Josh K 81 Reputation points
    2021-02-05T21:59:37.963+00:00

    This had no effect, unfortunately. I'm about to sign off for the day so let's pick this back up on Monday. Appreciate your suggestions!

    0 comments No comments