Search code examples
azureazcopy

How Does Setting AZCOPY_JOB_PLAN_LOCATION and AZCOPY_LOG_LOCATION Improve Disk Usage?


I'm using azcopy for file imports, and I'm having my space running out due to temporary files. I'm researching for a solution for the issue.

When I'm reading this section of the documentation, I didn't understand the following part:

Overrides where the files are stored, to avoid filling up a disk.

In my understanding, the log files would be the same size, regardless of where it is stored. How does changing its storage location help reducing the risk of filling up a disk? Do they mean to store the file on another disk? If so, wouldn't it still be equally limited by the amount of storage available?

So I'm not sure whether setting these variables in some way would help solving my problems, or should I look elsewhere. Some explanation on that paragraph in the documentation would be appreciated.


Solution

  • How Does Setting AZCOPY_JOB_PLAN_LOCATION and AZCOPY_LOG_LOCATION Improve Disk Usage?

    The AZCOPY_JOB_PLAN_LOCATION and AZCOPY_LOG_LOCATION settings to manage where AzCopy stores its job plan files and log files.

    AZCOPY_JOB_PLAN_LOCATION: Overrides where the job plan files are stored, to avoid filling up a disk.

    • When you use AzCopy for data transfers, it generates job plan and log files. These files can get quite large, especially for big data transfers, and might fill up your disk space. By default, these files are saved to your disk, so if you have limited space, you might run into issues with running out of space.
    • To address your issue of running out of space due to temporary files, you may want to consider setting the AZCOPY_JOB_PLAN_LOCATION and AZCOPY_LOG_LOCATION environment variables to a different disk with more available space.

    You can refer this MS-Document to improve AzCopy performance by minimizing the number of log entries it creates and disabling length checking.

    Reference: Find errors & resume jobs with logs in AzCopy (Azure Storage) | Microsoft Learn