Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azcopy copy does not follow symbolic links in subdirectories #791

Closed
Soushi-Atsumi opened this issue Dec 13, 2019 · 10 comments
Closed

azcopy copy does not follow symbolic links in subdirectories #791

Soushi-Atsumi opened this issue Dec 13, 2019 · 10 comments
Assignees

Comments

@Soushi-Atsumi
Copy link

Which version of the AzCopy was used?

AzCopy 10.3.2

Which platform are you using? (ex: Windows, Mac, Linux)

Windows 10 Pro 64bit

What command did you run?

azcopy.exe copy ".\dir2\" "https://host/blob/?$key" --follow-symlinks --recursive --from-to=LocalBlob

What problem was encountered?

failed to perform copy command due to error: no transfers were scheduled because no files matched the specified criteria

How can we reproduce the problem in the simplest way?

Try uploading any symbolic links from the parent directory with --recursive option.

Have you found a mitigation/solution?

Use wildcards instead of applying the option. This code works well.

azcopy.exe copy ".\dir2\*" "https://host/blob/?$key" --follow-symlinks --from-to=LocalBlob

However, only symbolic links in the first subdirectory are copied, and symbolic links in subdirectories of subdirectories are not copied.

@JohnRusk
Copy link
Member

@adreed-msft can you take a look?

@adreed-msft
Copy link
Member

I'm having some trouble reproducing this one myself.

I'm curious, @Soushi-Atsumi-- Have you tried removing the trailing \ on your local path? We've had some issues with our argument parsing framework WRT that on Windows.

Also, are these symlinks made with mklink or are they shortcuts?

@Soushi-Atsumi
Copy link
Author

Hi,

I'm curious, @Soushi-Atsumi-- Have you tried removing the trailing \ on your local path?

The same issue occurs even if I remove the trailing .

We've had some issues with our argument parsing framework WRT that on Windows.

Surely, this issue does not occur in Linux. I tried it now.

Also, are these symlinks made with mklink or are they shortcuts?

I created symlinks with New-Item in PowerShell. And now I tried uploading symlinks made with mklink but it failed too.

@adreed-msft
Copy link
Member

Interesting! Are there any other logs to stdout? (For instance, "Failed to resolve symlink", "Ignored already linked directory", etc.)

@Soushi-Atsumi
Copy link
Author

This is the all logs to stdout. I replaced the home directory as ~.

INFO: Scanning...
INFO: Ignored already seen file located at Z:\test\abc.txt (found at \\?\Z:\test\dir1\dir2\abc.txt)
INFO: Ignored already seen file located at Z:\test\bcd.txt (found at \\?\Z:\test\dir1\dir2\bcd.txt)

Job 9f702095-3d9a-e34a-62cd-97f41f7799a5 has started
Log file is located at: ~\.azcopy\9f702095-3d9a-e34a-62cd-97f41f7799a5.log


failed to perform copy command due to error: no transfers were scheduled because no files matched the specified criteria

@russdot
Copy link

russdot commented Apr 27, 2020

I can confirm the same behaviour on WSL.

@JohnRusk
Copy link
Member

What's the target of the symlink? A file or a directory?

@Soushi-Atsumi
Copy link
Author

Soushi-Atsumi commented Apr 29, 2020

Hi @JohnRusk

What's the target of the symlink? A file or a directory?

The target is a file. azcopy works correctly when it targets a symbolic link of a directory.

@JohnRusk
Copy link
Member

That's a known bug, I'm sorry. It doesn't currently work on symlinks to files. It's on our list to fix.

@nakulkar-msft
Copy link
Contributor

#718

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants