However, AzCopy does set up and monitor each transfer, and for larger storage accounts (For example, accounts that contain millions of blobs), AzCopy might require a substantial amount of compute resources to accomplish these tasks. That means that data is copied directly between storage servers. If your system has significant clock skew, avoid modifying files at the destination too close to the time that you plan to run a sync command.ĪzCopy uses server-to-server APIs to synchronize data between storage accounts. If you don't plan to use the -compare-hash flag, then the machine on which you run the sync command should have an accurate system clock because the last modified times are critical in determining whether a file should be transferred. The copy command consumes less memory and incurs less billing costs because a copy operation doesn't have to index the source or destination prior to moving files. Sync command and set the -overwrite parameter to ifSourceNewer. If you plan to set the -delete-destination flag to prompt or false, consider using the copy command instead of the If you want a prompt to appear before AzCopy deletes a file, set the -delete-destination flag to prompt. If you set the -delete-destination flag to true, AzCopy deletes files without providing a prompt. Set the -delete-destination optional flag to a value of true or prompt to delete files in the destination directory if those files no longer exist in the source directory. You can override that behavior to use MD5 hashes instead of last modified timestamps by using the -compare-hash flag. If the 'delete-destination' flag is set to true or prompt, then sync will delete files and blobs at the destination that aren't present at the source.īy default, the sync command compares file names and last modified timestamps.When syncing between virtual directories, add a trailing slash to the path (refer to examples) if there's a blob with the same name as one of the virtual directories.Sync copies only the top-level files inside a directory if the recursive flag is false. By default, the recursive flag is true and sync copies all subdirectories.The sync command differs from the copy command in several ways: Azure File Azure File (Source must include a SAS or is publicly accessible SAS authentication should be used for destination).Azure Blob Azure Blob (Source must include a SAS or is publicly accessible either SAS or OAuth authentication can be used for destination).Local Azure Blob / Azure File (either SAS or OAuth authentication can be used).Alternatively, you can use the -compare-hash flag to transfer only files which differ in their MD5 hash. The file is skipped if the last modified time in the destination is more recent. ![]() The last modified times are used for comparison. To learn more about synchronizing blobs between source and destination locations, see Synchronize with Azure Blob storage by using AzCopy v10. This article provides a detailed reference for the azcopy sync command. Replicates the source location to the destination location.
0 Comments
Leave a Reply. |