Azure-storage-azcopy: azcopy tries to copy symlinks incorrectly

Created on 1 Jul 2019  路  8Comments  路  Source: Azure/azure-storage-azcopy

Which version of the AzCopy was used?

AzcopyVersion 10.1.2
OS-Environment linux
OS-Architecture amd64

What command did you run?

./azcopy_linux_amd64_10.1.2/azcopy copy "hussam" "https://[BLOBCONTAINER].blob.core.windows.net/media/?[SAS]" --recursive --follow-symlinks

What problem was encountered?

Current directory: hussam.
This is symlinked to /tmp/hussam/
The directory i'm trying to copy is symlinked. It seems azcopy cannot cope with these symlinks. In the log file I found this error message:

ERR: [P#0-T#0] UPLOADFAILED: hussam/tmp/hussam/hussam.txt : 000 : Couldn't open source-open hussam/tmp/hussam/hussam.txt: no such file or directory

The directory of the symlink is /tmp/hussam/. It seems as though the azcopy command will paste the full symlink behind the symlink name instead of following it.

How can we reproduce the problem in the simplest way?

Can be reproduced by copying a symlinked folder to azure blobs

Have you found a mitigation/solution?

N/A

Most helpful comment

Alright, it looks like we're accidentally appending the entire dereferenced symlink location to the symlink name.

Atop this, it looks like we get an unhelpful error when not following symlinks.

This means we've got two items to fix here:

  1. Following symlinks
  2. Giving a proper error message for not following symlinks

All 8 comments

Alright, it looks like we're accidentally appending the entire dereferenced symlink location to the symlink name.

Atop this, it looks like we get an unhelpful error when not following symlinks.

This means we've got two items to fix here:

  1. Following symlinks
  2. Giving a proper error message for not following symlinks

For tracking purposes, can you ensure these are on the backlog @adreed-msft ?

symlinks following is also broken for me

@adreed-msft Are these both fixed for the 10.3 release? If so, can you mark this issue with the 10.3 milestone and the label fixed-pending-release? That will help us update this issues status correctly when we put that release out.

Needs retest to confirm whether fixed in 10.3

I recall explicitly testing this when I was fixing it up, but my local scenario works just fine. This should be good when 10.3 gets released. Thanks for opening up an issue!

This has been fixed up in the latest release (10.3.0)! Enjoy!

Thank you very much for you efforts!

Was this page helpful?
0 / 5 - 0 ratings